Search
Searching
- numpy.ma.MaskType.astype
...numpy.ma.MaskType.astype...
- numpy.ma.MaskType.astype (Python method, in numpy.ma.MaskType.astype)
- Interoperability with NumPy
...at the return type of these operations is still consistent with the initial type: >>> arr = cp.random.randn(1, 2, 3, 4).astype(cp.float32) >>> result = np.sum(arr) >>> print(type(result)) <class 'cupy._core.core.ndarray'> See this page in...
- NumPy 1.13.0 Release Notes
...,``np.add(a, b, out=a)`` will not involve copies. To illustrate a previously undefined operation: >>> x = np.arange(16).astype(float) >>> np.add(x[1:], x[:-1], out=x[1:]) In NumPy 1.13.0 the last line is guaranteed to be equivalent to: >>...
- NumPy 1.14.0 Release Notes
...nt directories. As a result, run_module_suite no longer works, i.e., python <path-to-test-file> results in an error. .astype(bool) on unstructured void arrays now calls bool on each element On Python 2, void_array.astype(bool) would alway...
- NumPy 1.15.0 Release Notes
...extended axis tuples np.ptp (peak-to-peak) can now work over multiple axes, just like np.max and np.min. MaskedArray.astype now is identical to ndarray.astype This means it takes all the same arguments, making more code written for ndarr...
- NumPy 1.24 Release Notes
...int8(-1) giving np.iinfo(np.uint8).max. Note that conversion between NumPy integers is unaffected, so that np.array(-1).astype(np.uint8) continues to work and use C integer overflow logic. For negative values, it will also work to view the...
- NumPy 1.25.0 Release Notes
...y protocols). (Deprecation started NumPy 1.20) (gh-23660) The niche FutureWarning when casting to a subarray dtype in astype or the array creation functions such as asarray is now finalized. The behavior is now always the same as if the s...
- NumPy 1.7.2 Release Notes
...undLocalError exception gh-442: Concatenate with axis=None now requires equal number of array elements gh-2485: Fix for astype(‘S’) string truncate issue gh-3312: bug in count_nonzero gh-2684: numpy.ma.average casts complex to float under c...
- NumPy 1.9.0 Release Notes
...a string. Previously can_cast in “safe” mode returned True for integer/float dtype and a string dtype of any length. astype and string dtype The astype method now returns an error if the string dtype to cast to is not long enough in “saf...
- NumPy 1.9.2 Release Notes
...#5316: fix too large dtype alignment of strings and complex types #5424: fix ma.median when used on ndarrays #5481: Fix astype for structured array fields of different byte order #5354: fix segfault when clipping complex arrays #5524: allow...
- NumPy 2.0.0 Release Notes
...ck the machine limits for data types. For example, np.iinfo(np.uint16) returns min = 0 and max = 65535. np.array(value).astype(dtype) will give the desired result. np.safe_eval has been deprecated. ast.literal_eval should be used instead....
- NumPy 2.1.0 Release Notes
...(a) or np.clip(a, None, None) a copy of the input array will be returned instead of raising an error. (gh-26724) numpy.astype now supports device argument. (gh-26724) f2py can generate freethreading-compatible C extensions Pass --freet...
- numpy.ma.diff
...nt8(255) If this is not desirable, then the array should be cast to a larger integer type first: >>> i16_arr = u8_arr.astype(np.int16) >>> np.ma.diff(i16_arr) masked_array(data=[-1], mask=False, fill_value=np.int64(999...
- numpy.ma.is_mask
...turn True if m is a valid, standard mask. This function does not check the contents of the input, only that the type is MaskType. In particular, this function returns False if the mask has a flexible dtype. Parameters: marray_likeArray to...
- numpy.ma.make_mask
...all its values are False. dtypedtype, optionalData-type of the output mask. By default, the output mask has a dtype of MaskType (bool). If the dtype is flexible, each field has a boolean dtype. This is ignored when m is nomask, in which ca...
- numpy.ma.make_mask_none
...type. Parameters: newshapetupleA tuple indicating the shape of the mask. dtype{None, dtype}, optionalIf None, use a MaskType instance. Otherwise, use a new datatype with the same fields as dtype, converted to boolean types. Returns:...
- numpy.ma.masked_array.astype
...numpy.ma.masked_array.astype...
- numpy.ma.masked_array.dtype
...precated in the future. Setting will replace the dtype without modifying the memory (see also ndarray.view and ndarray.astype). Parameters: None Returns: dnumpy dtype object See also ndarray.astypeCast the values contained in th...
- numpy.ma.MaskedArray.astype
...Array objects Masked arrays Constants of the numpy.ma module numpy.ma.MaskedArray.astype...
- numpy.ma.MaskedArray.dtype
...precated in the future. Setting will replace the dtype without modifying the memory (see also ndarray.view and ndarray.astype). Parameters: None Returns: dnumpy dtype object See also ndarray.astypeCast the values contained in th...
- numpy.ma.MaskType
...NumPy reference NumPy’s module structure Masked array operations numpy.ma.MaskType...
- numpy.ma.MaskType.all
...numpy.ma.MaskType.all...
- numpy.ma.MaskType.any
...numpy.ma.MaskType.any...
- numpy.ma.MaskType.argmax
...numpy.ma.MaskType.argmax...
- numpy.ma.MaskType.argmin
- numpy.ma.MaskType.argsort
...numpy.ma.MaskType.argsort...
- numpy.ma.MaskType.astype
...numpy.ma.MaskType.astype...
- numpy.ma.MaskType.base
- numpy.ma.MaskType.byteswap
- numpy.ma.MaskType.choose
...numpy.ma.MaskType.choose...
- numpy.ma.MaskType.clip
- numpy.ma.MaskType.compress
- numpy.ma.MaskType.conj
- numpy.ma.MaskType.conjugate
- numpy.ma.MaskType.copy
- numpy.ma.MaskType.cumprod
- numpy.ma.MaskType.cumsum
- numpy.ma.MaskType.data
- numpy.ma.MaskType.device
- numpy.ma.MaskType.diagonal
- numpy.ma.MaskType.dtype
- numpy.ma.MaskType.dump
- numpy.ma.MaskType.dumps
- numpy.ma.MaskType.fill
- numpy.ma.MaskType.flags
- numpy.ma.MaskType.flat
- numpy.ma.MaskType.flatten
- numpy.ma.MaskType.getfield
- numpy.ma.MaskType.imag
- numpy.ma.MaskType.item
- numpy.ma.MaskType.itemset
- numpy.ma.MaskType.itemsize
- numpy.ma.MaskType.max
- numpy.ma.MaskType.mean
- numpy.ma.MaskType.min