Search
Searching...
- numpy.ma.MaskType.data
...numpy.ma.MaskType.data...
- numpy.ma.MaskType.data (Python attribute, in numpy.ma.MaskType.data)
- Constants of the
numpy.ma
module...module defines several constants. numpy.ma.masked The masked constant is a special case of MaskedArray, with a float datatype and a null shape. It is used to test whether a specific entry of a masked array is masked, or to mask one or se...
- Interoperability with NumPy
...Interoperability with NumPy NumPy’s ndarray objects provide both a high-level API for operations on array-structured data and a concrete implementation of the API based on strided in-RAM storage. While this API is powerful and fairly gen...
- NumPy 1.10.0 Release Notes
...can now be used with periodic functions np.interp now has a new parameter period that supplies the period of the input data xp. In such case, the input data is properly normalized to the given period and one end point is added to each extr...
- NumPy 1.11.0 Release Notes
...s a dtype type of different size causing the first dimension to change. Slicing a MaskedArray will return views of both data and mask. Currently the mask is copy-on-write and changes to the mask in the slice do not propagate to the original...
- NumPy 1.12.0 Release Notes
...preserved, instead of being reordered to match that of the directories. Deprecations Assignment of ndarray object’s data attribute Assigning the ‘data’ attribute is an inherently unsafe operation as pointed out in gh-7083. Such a capabi...
- NumPy 1.13.0 Release Notes
...ng numpy.unique. The original behaviour is recovered if axis=None (default). np.gradient now supports unevenly spaced data Users can now specify a not-constant spacing for data. In particular np.gradient can now take: A single scalar to...
- NumPy 1.14.0 Release Notes
...strings and – after encoding them as either utf-8 (python 3) or the default encoding (python 2) – treats them as binary data. If reading binary data is desired, np.frombuffer should be used directly. The style option of array2string is depr...
- NumPy 1.15.0 Release Notes
...l accept NaN values when explicit bins are given Previously it would fail when trying to compute a finite range for the data. Since the range is ignored anyway when the bins are given explicitly, this error was needless. Note that calling h...
- NumPy 1.18.0 Release Notes
...te hypergeometric probability distribution. (gh-13794) Deprecations np.fromfile and np.fromstring will error on bad data In future numpy releases, the functions np.fromfile and np.fromstring will throw an error when parsing bad data. Th...
- NumPy 1.22.0 Release Notes
...ns such as CuPy and JAX. NumPy now has a DLPack backend. DLPack provides a common interchange format for array (tensor) data. New methods for quantile, percentile, and related functions. The new methods provide a complete set of the methods...
- NumPy 1.23.0 Release Notes
...s are: Implementation of loadtxt in C, greatly improving its performance. Exposing DLPack at the Python level for easy data exchange. Changes to the promotion and comparisons of structured dtypes. Improvements to f2py. See below for the d...
- NumPy 1.24 Release Notes
...int8).view(np.uint8). In some cases, using np.iinfo(np.uint8).max or val % 2**8 may also work well. In rare cases input data may mix both negative values and very large unsigned values (i.e. -1 and 2**63). There it is unfortunately necessa...
- NumPy 1.25.0 Release Notes
...output dtype using the dtype kwarg can make the operation succeed, but we do not recommend it. (gh-22707) When loading data from a file handle using np.load, if the handle is at the end of file, as can happen when reading multiple arrays b...
- NumPy 1.6.0 Release Notes
...tures New 16-bit floating point type This release adds support for the IEEE 754-2008 binary16 format, available as the data type numpy.half. Within Python, the type behaves similarly to float or double, and C extensions can add support fo...
- NumPy 1.7.2 Release Notes
...of mmap slicing gh-3421: fix non-swapping strided copies in GetStridedCopySwap gh-3373: fix small leak in datetime metadata initialization gh-2791: add platform specific python include directories to search paths gh-3168: fix undefined fun...
- NumPy 1.9.0 Release Notes
...nient broadcasting to arrays of the original shape. Dtype parameter added to np.linspace and np.logspace The returned data type from the linspace and logspace functions can now be specified using the dtype parameter. More general np.tri...
- NumPy 1.9.2 Release Notes
...arrays #5612: Fixes ndarray.fill to accept full range of uint64 #5155: Fix loadtxt with comments=None and a string None data #4476: Masked array view fails if structured dtype has datetime component #5388: Make RandomState.set_state and Ran...
- NumPy 2.0.0 Release Notes
...vior was changed by adopting NEP 50. This fixes many user surprises about promotions which previously often depended on data values of input arrays rather than only their dtypes. Please see the NEP and the NumPy 2.0 migration guide for det...
- NumPy 2.1.0 Release Notes
...extension as compatible. (gh-26981) Improvements histogram auto-binning now returns bin sizes >=1 for integer input data For integer input data, bin sizes smaller than 1 result in spurious empty bins. This is now avoided when the numbe...
- numpy.average
...ms=<no value>)[source] Compute the weighted average along the specified axis. Parameters: aarray_likeArray containing data to be averaged. If a is not an array, a conversion is attempted. axisNone or int or tuple of ints, optionalAxis or...
- numpy.concat
...ith out. New in version 1.20.0. casting{‘no’, ‘equiv’, ‘safe’, ‘same_kind’, ‘unsafe’}, optionalControls what kind of data casting may occur. Defaults to ‘same_kind’. For a description of the options, please see casting. New in version 1...
- numpy.concatenate
...ith out. New in version 1.20.0. casting{‘no’, ‘equiv’, ‘safe’, ‘same_kind’, ‘unsafe’}, optionalControls what kind of data casting may occur. Defaults to ‘same_kind’. For a description of the options, please see casting. New in version 1...
- numpy.ma.allclose
...tolerances. Examples >>> import numpy as np >>> a = np.ma.array([1e10, 1e-7, 42.0], mask=[0, 0, 1]) >>> a masked_array(data=[10000000000.0, 1e-07, --], mask=[False, False, True], fill_value=1e+20) >>> b = np.ma.array([...
- numpy.ma.allequal
...a.allclose Examples >>> import numpy as np >>> a = np.ma.array([1e10, 1e-7, 42.0], mask=[0, 0, 1]) >>> a masked_array(data=[10000000000.0, 1e-07, --], mask=[False, False, True], fill_value=1e+20) >>> b = np.array([1...
- numpy.ma.anom
...ompute the mean of the array. Examples >>> import numpy as np >>> a = np.ma.array([1,2,3]) >>> a.anom() masked_array(data=[-1., 0., 1.], mask=False, fill_value=1e+20)...
- numpy.ma.anomalies
...ompute the mean of the array. Examples >>> import numpy as np >>> a = np.ma.array([1,2,3]) >>> a.anom() masked_array(data=[-1., 0., 1.], mask=False, fill_value=1e+20)...
- numpy.ma.append
...a = ma.masked_values([1, 2, 3], 2) >>> b = ma.masked_values([[4, 5, 6], [7, 8, 9]], 7) >>> ma.append(a, b) masked_array(data=[1, --, 3, 4, 5, 6, --, 8, 9], mask=[False, True, False, False, False, False, True, False,...
- numpy.ma.apply_over_axes
...p >>> a = np.ma.arange(24).reshape(2,3,4) >>> a[:,0,1] = np.ma.masked >>> a[:,1,:] = np.ma.masked >>> a masked_array( data=[[[0, --, 2, 3], [--, --, --, --], [8, 9, 10, 11]], [[12, --, 14, 15], [--, --,...
- numpy.ma.arange
...rgument, start must also be given. dtypedtype, optionalThe type of the output array. If dtype is not given, infer the data type from the other input arguments. devicestr, optionalThe device on which to place the created array. Default: N...
- numpy.ma.argmin
..._valuescalar or None, optionalValue used to fill in the masked values. If None, the output of minimum_fill_value(self._data) is used instead. out{None, array}, optionalArray into which the result can be placed. Its type is preserved and i...
- numpy.ma.argsort
...argest values (True) or the smallest values (False) When the array contains unmasked values at the same extremes of the datatype, the ordering of these values and the masked values is undefined. fill_valuescalar or None, optionalValue used...
- numpy.ma.array
...numpy.ma.array ma.array(data, dtype=None, copy=False, order=None, mask=np.False_, fill_value=None, keep_mask=True, hard_mask=False, shrink=True,...
- numpy.ma.asanyarray
...dArray, its class is conserved. No copy is performed if the input is already an ndarray. Parameters: aarray_likeInput data, in any form that can be converted to an array. dtypedtype, optionalBy default, the data-type is inferred from the...
- numpy.ma.asarray
...numpy.ma.asarray ma.asarray(a, dtype=None, order=None)[source] Convert the input to a masked array of the given data-type. No copy is performed if the input is already an ndarray. If a is a subclass of MaskedArray, a base class Mask...
- numpy.ma.average
...lse, *, keepdims=<no value>)[source] Return the weighted average of array over the given axis. Parameters: aarray_likeData to be averaged. Masked entries are not taken into account in the computation. axisNone or int or tuple of ints, op...
- numpy.ma.choose
...>>> choice = np.array([[1,1,1], [2,2,2], [3,3,3]]) >>> a = np.array([2, 1, 0]) >>> np.ma.choose(a, choice) masked_array(data=[3, 2, 1], mask=False, fill_value=999999)...
- numpy.ma.compress_rowcols
...[1, 0, 0], ... [0, 0, 0]]) >>> x masked_array( data=[[--, 1, 2], [--, 4, 5], [6, 7, 8]], mask=[[ True, False, False], [ True, False, False],...
- numpy.ma.compressed
...numpy.ma.compressed ma.compressed(x)[source] Return all the non-masked data as a 1-D array. This function is equivalent to calling the “compressed” method of a ma.MaskedArray, see ma.MaskedAr...
- numpy.ma.concatenate
...py as np >>> import numpy.ma as ma >>> a = ma.arange(3) >>> a[1] = ma.masked >>> b = ma.arange(2, 5) >>> a masked_array(data=[0, --, 2], mask=[False, True, False], fill_value=999999) >>> b masked_array(data=[2, 3, 4],...
- numpy.ma.corrcoef
...ue, ddof=<no value>)[source] Return Pearson product-moment correlation coefficients. Except for the handling of missing data this function does the same as numpy.corrcoef. For more details and examples, see numpy.corrcoef. Parameters: xar...
- numpy.ma.correlate
...ion: >>> a = np.ma.array([1, 2, 3]) >>> v = np.ma.array([0, 1, 0]) >>> np.ma.correlate(a, v, mode='valid') masked_array(data=[2], mask=[False], fill_value=999999) Correlation with masked elements: >>> a = np.ma.array([...
- numpy.ma.count
...Examples >>> import numpy.ma as ma >>> a = ma.arange(6).reshape((2, 3)) >>> a[1, :] = ma.masked >>> a masked_array( data=[[0, 1, 2], [--, --, --]], mask=[[False, False, False], [ True, True, True]], fill_value=9999...
- numpy.ma.count_masked
...= np.ma.array(a) >>> a[1, 0] = np.ma.masked >>> a[1, 2] = np.ma.masked >>> a[2, 1] = np.ma.masked >>> a masked_array( data=[[0, 1, 2], [--, 4, --], [6, --, 8]], mask=[[False, False, False], [ True, False, True],...
- numpy.ma.cov
...e, bias=False, allow_masked=True, ddof=None)[source] Estimate the covariance matrix. Except for the handling of missing data this function does the same as numpy.cov. For more details and examples, see numpy.cov. By default, masked values a...
- numpy.ma.cumsum
...>>> import numpy as np >>> marr = np.ma.array(np.arange(10), mask=[0,0,0,1,1,1,0,0,0,0]) >>> marr.cumsum() masked_array(data=[0, 1, 3, --, --, --, 9, 16, 24, 33], mask=[False, False, False, True, True, True, False, False,...
- numpy.ma.default_fill_value
...fill_value(obj)[source] Return the default fill value for the argument object. The default filling value depends on the datatype of the input array or the type of the input scalar: datatype default bool True int 999999 float 1.e20...
- numpy.ma.diag
- numpy.ma.diagflat
- numpy.ma.diff
- numpy.ma.dot
- numpy.ma.dstack
- numpy.ma.ediff1d
- numpy.ma.empty
- numpy.ma.empty_like
- numpy.ma.filled
- numpy.ma.fix_invalid
- numpy.ma.flatnotmasked_contiguous
- numpy.ma.flatten_structured_array
- numpy.ma.frombuffer
- numpy.ma.fromflex
- numpy.ma.fromfunction
- numpy.ma.getdata
- numpy.ma.getmask
- numpy.ma.getmaskarray
- numpy.ma.hstack
- numpy.ma.identity
- numpy.ma.in1d
- numpy.ma.indices
- numpy.ma.intersect1d
- numpy.ma.is_mask
- numpy.ma.is_masked
- numpy.ma.isarray
- numpy.ma.isin
- numpy.ma.isMA
- numpy.ma.isMaskedArray
- numpy.ma.left_shift
- numpy.ma.make_mask
- numpy.ma.make_mask_none
- numpy.ma.mask_cols
- numpy.ma.mask_rowcols
- numpy.ma.mask_rows
- numpy.ma.masked_all
- numpy.ma.masked_all_like
- numpy.ma.masked_array.anom
- numpy.ma.masked_array.argmin
- numpy.ma.masked_array.argsort
- numpy.ma.masked_array.astype
- numpy.ma.masked_array.baseclass
- numpy.ma.masked_array.byteswap
- numpy.ma.masked_array.compress
- numpy.ma.masked_array.compressed
- numpy.ma.masked_array.count
- numpy.ma.masked_array.ctypes
- numpy.ma.masked_array.cumsum
- numpy.ma.masked_array.data
- numpy.ma.masked_array.dot
- numpy.ma.masked_array.dtype
- numpy.ma.masked_array.fill_value
- numpy.ma.masked_array.filled
- numpy.ma.masked_array.flags
- numpy.ma.masked_array.get_fill_value
- numpy.ma.masked_array.get_imag
- numpy.ma.masked_array.get_real
- numpy.ma.masked_array.getfield
- numpy.ma.masked_array.hardmask
- numpy.ma.masked_array.ids
- numpy.ma.masked_array.imag
- numpy.ma.masked_array.iscontiguous
- numpy.ma.masked_array.item
- numpy.ma.masked_array.max
- numpy.ma.masked_array.mean
- numpy.ma.masked_array.min
- numpy.ma.masked_array.nonzero
- numpy.ma.masked_array.ptp
- numpy.ma.masked_array.put
- numpy.ma.masked_array.ravel
- numpy.ma.masked_array.real
- numpy.ma.masked_array.reshape
- numpy.ma.masked_array.resize
- numpy.ma.masked_array.round
- numpy.ma.masked_array.setfield
- numpy.ma.masked_array.setflags
- numpy.ma.masked_array.shrink_mask
- numpy.ma.masked_array.sort
- numpy.ma.masked_array.strides
- numpy.ma.masked_array.sum
- numpy.ma.masked_array.take
- numpy.ma.masked_array.tobytes
- numpy.ma.masked_array.toflex
- numpy.ma.masked_array.tolist
- numpy.ma.masked_array.torecords
- numpy.ma.masked_array.transpose
- numpy.ma.masked_array.var
- numpy.ma.masked_array.view
- numpy.ma.masked_equal
- numpy.ma.masked_greater
- numpy.ma.masked_greater_equal
- numpy.ma.masked_inside
- numpy.ma.masked_invalid
- numpy.ma.masked_less
- numpy.ma.masked_less_equal
- numpy.ma.masked_not_equal
- numpy.ma.masked_object
- numpy.ma.masked_outside
- numpy.ma.masked_values
- numpy.ma.masked_where
- numpy.ma.MaskedArray.__array__
- numpy.ma.MaskedArray.__eq__
- numpy.ma.MaskedArray.__ne__
- numpy.ma.MaskedArray.__new__
- numpy.ma.MaskedArray.__setstate__
- numpy.ma.MaskedArray.anom
- numpy.ma.MaskedArray.argmin
- numpy.ma.MaskedArray.argsort
- numpy.ma.MaskedArray.astype
- numpy.ma.MaskedArray.byteswap
- numpy.ma.MaskedArray.compress
- numpy.ma.MaskedArray.compressed
- numpy.ma.MaskedArray.count
- numpy.ma.MaskedArray.ctypes