Numpy Testing For Finite Values

Description

We can use the isfinite command to see if a value is a finite number.

Sage Cell

Code

import numpy as np
a = 5
b = np.inf
print np.isfinite(a)
print np.isfinite(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:35

Submitted by: Zane Corbiere

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License