关于:
numpy.isnan(array [,out]):逐个元素测试是否为NaN并以布尔数组形式返回结果。
参数:
array:[array_like]Input array or object whose elements, we need to test for infinity
out :[ndarray, optional]Output array placed with result.
Its type is preserved and it must be of the right shape to hold the output.
返回:
boolean array containing the result. For scalar input, the result is a new boolean with value
True if the input is positive or negative infinity; otherwise the value is False.
For array input, the result is a boolean array with the same shape as the input and the values
are True where the corresponding element of the input is positive or negative infinity;
elsewhere the values are False.
代码1:
# Python Program illustrating
# numpy.isnan() method
import numpy as geek
print("Is NaN:", ge