Search
Search Results
Search finished, found 29 page(s) matching the search query.
- numpy.isnan
...NumPy reference Routines and objects by topic Logic functions numpy.isnan...
- numpy.isnan (Python data, in numpy.isnan)
- Miscellaneous
...ns instead. False >>> myarr[myarr == np.nan] = 0. # doesn't work >>> myarr array([ 1., 0., nan, 3.]) >>> myarr[np.isnan(myarr)] = 0. # use this instead find >>> myarr array([1., 0., 0., 3.]) Other related special value functions:...
- NumPy 1.13.0 Release Notes
...ufunc np.isnat finds the positions of special NaT values within datetime and timedelta arrays. This is analogous to np.isnan. np.heaviside ufunc computes the Heaviside function The new function np.heaviside(x, h0) (a ufunc) computes the...
- NumPy 1.17.0 Release Notes
...n an initial value (e.g., initial=np.inf for min). For instance, the equivalent of nansum would be np.sum(a, where=~np.isnan(a)). Timsort and radix sort have replaced mergesort for stable sorting Both radix sort and timsort have been imp...
- NumPy 1.18.0 Release Notes
...4, timedelta64 np.datetime('NaT') should behave more like float('Nan'). Add needed infrastructure so np.isinf(a) and np.isnan(a) will run on datetime64 and timedelta64 dtypes. Also added specific loops for numpy.fmin and numpy.fmax that mas...
- NumPy 1.8.0 Release Notes
...wards compatibility). Scaling with dimensionality is dramatically improved for rank >= 4. Performance improvements to isnan, isinf, isfinite and byteswap isnan, isinf, isfinite and byteswap have been improved to take advantage of compiler...
- NumPy core math library
...he sign bit set). The corresponding single and extension precision macro are available with the suffix F and L. npy_isnan(x) This is an alias for C99 isnan: works for single, double and extended precision, and return a non 0 value if x...
- numpy.isfinite
...egative infinity, or NaN; false otherwise. This is a scalar if x is a scalar. See also isinf, isneginf, isposinf, isnan Notes Not a Number, positive infinity and negative infinity are considered to be non-finite. NumPy uses the IEEE...
- numpy.isinf
...s positive or negative infinity, false otherwise. This is a scalar if x is a scalar. See also isneginf, isposinf, isnan, isfinite Notes NumPy uses the IEEE Standard for Binary Floating-Point for Arithmetic (IEEE 754). Errors result...
- numpy.isnan
...NumPy reference Routines and objects by topic Logic functions numpy.isnan...
- numpy.isnat
...s. Returns: yndarray or boolTrue where x is NaT, false otherwise. This is a scalar if x is a scalar. See also isnan, isinf, isneginf, isposinf, isfinite Examples Try it in your browser! >>> import numpy as np >>> np.isnat(np.da...
- numpy.isneginf
...boolean then as False and True. The return value out is then a reference to that array. See also isinf, isposinf, isnan, isfinite Notes NumPy uses the IEEE Standard for Binary Floating-Point for Arithmetic (IEEE 754). Errors result...
- numpy.isposinf
...en as False and True. The return value out is then a reference to that array. See also isinf, isneginf, isfinite, isnan Notes NumPy uses the IEEE Standard for Binary Floating-Point for Arithmetic (IEEE 754). Errors result if the sec...
- numpy.max
...ray([-1, 3]) >>> b = np.arange(5, dtype=float) >>> b[2] = np.nan >>> np.max(b) np.float64(nan) >>> np.max(b, where=~np.isnan(b), initial=-1) 4.0 >>> np.nanmax(b) 4.0 You can use an initial value to compute the maximum of an empty slice,...
- numpy.min
...y([10, 1]) >>> b = np.arange(5, dtype=float) >>> b[2] = np.nan >>> np.min(b) np.float64(nan) >>> np.min(b, where=~np.isnan(b), initial=10) 0.0 >>> np.nanmin(b) 0.0 >>> np.min([[-50], [10]], axis=-1, initial=0) array([-50, 0]) Notic...
- numpy.nan_to_num
...ve infinity. isneginfShows which elements are negative infinity. isposinfShows which elements are positive infinity. isnanShows which elements are Not a Number (NaN). isfiniteShows which elements are finite (not NaN, not infinity) No...
- numpy.nancumprod
- numpy.nancumsum
- numpy.nanmax
- numpy.nanmin
- numpy.nanprod
- numpy.nansum
- numpy.ufunc.reduce
- npy_half_isnan (C function, in NumPy core math library)
- npy_isnan (C macro, in NumPy core math library)
- Constants
...ve infinity isposinf : Shows which elements are positive infinity isneginf : Shows which elements are negative infinity isnan : Shows which elements are Not a Number isfinite : Shows which elements are finite (not one of Not a Number, posit...
- Indexing on
ndarrays
...l entries from an array which are not numpy.nan: >>> x = np.array([[1., 2.], [np.nan, 3.], [np.nan, np.nan]]) >>> x[~np.isnan(x)] array([1., 2., 3.]) Or wish to add a constant to all negative elements: >>> x = np.array([1., -1., -2., 3])...
- npy_half_isnan.h (C function parameter, in NumPy core math library)