Numpy Testing For NaN Values
Description
We can use the isnan command to test a value to see if it is not a number (i.e. $\frac{1}{0}$).
Sage Cell
Code
import numpy as np
a = np.nan
b = 5
print np.isnan(a)
print np.isnan(b)
Options
none
Tags
Primary Tags:
Secondary Tags:
A list of possible tags can be found at The WeBWorK Open Problem Library. For linear algebra tags see the Curated Courses Project.
Related Cells
Any related cells go here. Provide a link to the page containing the information about the cell.
Attribute
Permalink:
Author:
Date: 15 Apr 2019 00:48
Submitted by: Zane Corbiere