doc_content
stringlengths
1
386k
doc_id
stringlengths
5
188
numpy.ma.MaskedArray.__rpow__ method ma.MaskedArray.__rpow__(other)[source] Raise other to the power self, masking the potential NaNs/Infs
numpy.reference.generated.numpy.ma.maskedarray.__rpow__
numpy.ma.MaskedArray.__rrshift__ method ma.MaskedArray.__rrshift__(value, /) Return value>>self.
numpy.reference.generated.numpy.ma.maskedarray.__rrshift__
numpy.ma.MaskedArray.__rshift__ method ma.MaskedArray.__rshift__(value, /) Return self>>value.
numpy.reference.generated.numpy.ma.maskedarray.__rshift__
numpy.ma.MaskedArray.__rsub__ method ma.MaskedArray.__rsub__(other)[source] Subtract self from other, and return a new masked array.
numpy.reference.generated.numpy.ma.maskedarray.__rsub__
numpy.ma.MaskedArray.__rtruediv__ method ma.MaskedArray.__rtruediv__(other)[source] Divide self into other, and return a new masked array.
numpy.reference.generated.numpy.ma.maskedarray.__rtruediv__
numpy.ma.MaskedArray.__rxor__ method ma.MaskedArray.__rxor__(value, /) Return value^self.
numpy.reference.generated.numpy.ma.maskedarray.__rxor__
numpy.ma.MaskedArray.__setitem__ method ma.MaskedArray.__setitem__(indx, value)[source] x.__setitem__(i, y) <==> x[i]=y Set item described by index. If value is masked, masks those locations.
numpy.reference.generated.numpy.ma.maskedarray.__setitem__
numpy.ma.MaskedArray.__setmask__ method ma.MaskedArray.__setmask__(mask, copy=False)[source] Set the mask.
numpy.reference.generated.numpy.ma.maskedarray.__setmask__
numpy.ma.MaskedArray.__setstate__ method ma.MaskedArray.__setstate__(state)[source] Restore the internal state of the masked array, for pickling purposes. state is typically the output of the __getstate__ output, and is a 5-tuple: class name a tuple giving the shape of the data a typecode for the data a binary str...
numpy.reference.generated.numpy.ma.maskedarray.__setstate__
numpy.ma.MaskedArray.__str__ method ma.MaskedArray.__str__()[source] Return str(self).
numpy.reference.generated.numpy.ma.maskedarray.__str__
numpy.ma.MaskedArray.__sub__ method ma.MaskedArray.__sub__(other)[source] Subtract other from self, and return a new masked array.
numpy.reference.generated.numpy.ma.maskedarray.__sub__
numpy.ma.MaskedArray.__truediv__ method ma.MaskedArray.__truediv__(other)[source] Divide other into self, and return a new masked array.
numpy.reference.generated.numpy.ma.maskedarray.__truediv__
numpy.ma.MaskedArray.__xor__ method ma.MaskedArray.__xor__(value, /) Return self^value.
numpy.reference.generated.numpy.ma.maskedarray.__xor__
numpy.ma.MaskedArray.all method ma.MaskedArray.all(axis=None, out=None, keepdims=<no value>)[source] Returns True if all elements evaluate to True. The output array is masked where all the values along the given axis are masked: if the output would have been a scalar and that all the values are masked, then the out...
numpy.reference.generated.numpy.ma.maskedarray.all
numpy.ma.MaskedArray.anom method ma.MaskedArray.anom(axis=None, dtype=None)[source] Compute the anomalies (deviations from the arithmetic mean) along the given axis. Returns an array of anomalies, with the same shape as the input and where the arithmetic mean is computed along the given axis. Parameters axisint...
numpy.reference.generated.numpy.ma.maskedarray.anom
numpy.ma.MaskedArray.any method ma.MaskedArray.any(axis=None, out=None, keepdims=<no value>)[source] Returns True if any of the elements of a evaluate to True. Masked values are considered as False during computation. Refer to numpy.any for full documentation. See also numpy.ndarray.any corresponding function fo...
numpy.reference.generated.numpy.ma.maskedarray.any
numpy.ma.MaskedArray.argmax method ma.MaskedArray.argmax(axis=None, fill_value=None, out=None, *, keepdims=<no value>)[source] Returns array of indices of the maximum values along the given axis. Masked values are treated as if they had the value fill_value. Parameters axis{None, integer} If None, the index i...
numpy.reference.generated.numpy.ma.maskedarray.argmax
numpy.ma.MaskedArray.argmin method ma.MaskedArray.argmin(axis=None, fill_value=None, out=None, *, keepdims=<no value>)[source] Return array of indices to the minimum values along the given axis. Parameters axis{None, integer} If None, the index is into the flattened array, otherwise along the specified axis ...
numpy.reference.generated.numpy.ma.maskedarray.argmin
numpy.ma.MaskedArray.argsort method ma.MaskedArray.argsort(axis=<no value>, kind=None, order=None, endwith=True, fill_value=None)[source] Return an ndarray of indices that sort the array along the specified axis. Masked values are filled beforehand to fill_value. Parameters axisint, optional Axis along which ...
numpy.reference.generated.numpy.ma.maskedarray.argsort
numpy.ma.MaskedArray.astype method ma.MaskedArray.astype(dtype, order='K', casting='unsafe', subok=True, copy=True) Copy of the array, cast to a specified type. Parameters dtypestr or dtype Typecode or data-type to which the array is cast. order{‘C’, ‘F’, ‘A’, ‘K’}, optional Controls the memory layout ord...
numpy.reference.generated.numpy.ma.maskedarray.astype
numpy.ma.MaskedArray.base attribute ma.MaskedArray.base Base object if memory is from some other object. Examples The base of an array that owns its memory is None: >>> x = np.array([1,2,3,4]) >>> x.base is None True Slicing creates a view, whose memory is shared with x: >>> y = x[2:] >>> y.base is x True
numpy.reference.generated.numpy.ma.maskedarray.base
numpy.ma.MaskedArray.byteswap method ma.MaskedArray.byteswap(inplace=False) Swap the bytes of the array elements Toggle between low-endian and big-endian data representation by returning a byteswapped array, optionally swapped in-place. Arrays of byte-strings are not swapped. The real and imaginary parts of a compl...
numpy.reference.generated.numpy.ma.maskedarray.byteswap
numpy.ma.MaskedArray.choose method ma.MaskedArray.choose(choices, out=None, mode='raise') Use an index array to construct a new array from a set of choices. Refer to numpy.choose for full documentation. See also numpy.choose equivalent function
numpy.reference.generated.numpy.ma.maskedarray.choose
numpy.ma.MaskedArray.clip method ma.MaskedArray.clip(min=None, max=None, out=None, **kwargs) Return an array whose values are limited to [min, max]. One of max or min must be given. Refer to numpy.clip for full documentation. See also numpy.clip equivalent function
numpy.reference.generated.numpy.ma.maskedarray.clip
numpy.ma.MaskedArray.compress method ma.MaskedArray.compress(condition, axis=None, out=None)[source] Return a where condition is True. If condition is a MaskedArray, missing values are considered as False. Parameters conditionvar Boolean 1-d array selecting which entries to return. If len(condition) is less t...
numpy.reference.generated.numpy.ma.maskedarray.compress
numpy.ma.MaskedArray.compressed method ma.MaskedArray.compressed()[source] Return all the non-masked data as a 1-D array. Returns datandarray A new ndarray holding the non-masked data is returned. Notes The result is not a MaskedArray! Examples >>> x = np.ma.array(np.arange(5), mask=[0]*2 + [1]*3) >>> x.c...
numpy.reference.generated.numpy.ma.maskedarray.compressed
numpy.ma.MaskedArray.conj method ma.MaskedArray.conj() Complex-conjugate all elements. Refer to numpy.conjugate for full documentation. See also numpy.conjugate equivalent function
numpy.reference.generated.numpy.ma.maskedarray.conj
numpy.ma.MaskedArray.conjugate method ma.MaskedArray.conjugate() Return the complex conjugate, element-wise. Refer to numpy.conjugate for full documentation. See also numpy.conjugate equivalent function
numpy.reference.generated.numpy.ma.maskedarray.conjugate
numpy.ma.MaskedArray.copy method ma.MaskedArray.copy(order='C')[source] Return a copy of the array. Parameters order{‘C’, ‘F’, ‘A’, ‘K’}, optional Controls the memory layout of the copy. ‘C’ means C-order, ‘F’ means F-order, ‘A’ means ‘F’ if a is Fortran contiguous, ‘C’ otherwise. ‘K’ means match the layout o...
numpy.reference.generated.numpy.ma.maskedarray.copy
numpy.ma.MaskedArray.count method ma.MaskedArray.count(axis=None, keepdims=<no value>)[source] Count the non-masked elements of the array along the given axis. Parameters axisNone or int or tuple of ints, optional Axis or axes along which the count is performed. The default, None, performs the count over all ...
numpy.reference.generated.numpy.ma.maskedarray.count
numpy.ma.MaskedArray.ctypes attribute ma.MaskedArray.ctypes An object to simplify the interaction of the array with the ctypes module. This attribute creates an object that makes it easier to use arrays when calling shared libraries with the ctypes module. The returned object has, among others, data, shape, and str...
numpy.reference.generated.numpy.ma.maskedarray.ctypes
numpy.ma.MaskedArray.cumprod method ma.MaskedArray.cumprod(axis=None, dtype=None, out=None)[source] Return the cumulative product of the array elements over the given axis. Masked values are set to 1 internally during the computation. However, their position is saved, and the result will be masked at the same locat...
numpy.reference.generated.numpy.ma.maskedarray.cumprod
numpy.ma.MaskedArray.cumsum method ma.MaskedArray.cumsum(axis=None, dtype=None, out=None)[source] Return the cumulative sum of the array elements over the given axis. Masked values are set to 0 internally during the computation. However, their position is saved, and the result will be masked at the same locations. ...
numpy.reference.generated.numpy.ma.maskedarray.cumsum
numpy.ma.MaskedArray.diagonal method ma.MaskedArray.diagonal(offset=0, axis1=0, axis2=1)[source] Return specified diagonals. In NumPy 1.9 the returned array is a read-only view instead of a copy as in previous NumPy versions. In a future version the read-only restriction will be removed. Refer to numpy.diagonal for...
numpy.reference.generated.numpy.ma.maskedarray.diagonal
numpy.ma.MaskedArray.dump method ma.MaskedArray.dump(file) Dump a pickle of the array to the specified file. The array can be read back with pickle.load or numpy.load. Parameters filestr or Path A string naming the dump file. Changed in version 1.17.0: pathlib.Path objects are now accepted.
numpy.reference.generated.numpy.ma.maskedarray.dump
numpy.ma.MaskedArray.dumps method ma.MaskedArray.dumps() Returns the pickle of the array as a string. pickle.loads will convert the string back to an array. Parameters None
numpy.reference.generated.numpy.ma.maskedarray.dumps
numpy.ma.MaskedArray.fill method ma.MaskedArray.fill(value) Fill the array with a scalar value. Parameters valuescalar All elements of a will be assigned this value. Examples >>> a = np.array([1, 2]) >>> a.fill(0) >>> a array([0, 0]) >>> a = np.empty(2) >>> a.fill(1) >>> a array([1., 1.])
numpy.reference.generated.numpy.ma.maskedarray.fill
numpy.ma.MaskedArray.filled method ma.MaskedArray.filled(fill_value=None)[source] Return a copy of self, with masked values filled with a given value. However, if there are no masked values to fill, self will be returned instead as an ndarray. Parameters fill_valuearray_like, optional The value to use for inv...
numpy.reference.generated.numpy.ma.maskedarray.filled
numpy.ma.MaskedArray.flags attribute ma.MaskedArray.flags Information about the memory layout of the array. Notes The flags object can be accessed dictionary-like (as in a.flags['WRITEABLE']), or by using lowercased attribute names (as in a.flags.writeable). Short flag names are only supported in dictionary access....
numpy.reference.generated.numpy.ma.maskedarray.flags
numpy.ma.MaskedArray.flatten method ma.MaskedArray.flatten(order='C')[source] Return a copy of the array collapsed into one dimension. Parameters order{‘C’, ‘F’, ‘A’, ‘K’}, optional ‘C’ means to flatten in row-major (C-style) order. ‘F’ means to flatten in column-major (Fortran- style) order. ‘A’ means to fla...
numpy.reference.generated.numpy.ma.maskedarray.flatten
numpy.ma.MaskedArray.get_fill_value method ma.MaskedArray.get_fill_value()[source] The filling value of the masked array is a scalar. When setting, None will set to a default based on the data type. Examples >>> for dt in [np.int32, np.int64, np.float64, np.complex128]: ... np.ma.array([0, 1], dtype=dt).get_fil...
numpy.reference.generated.numpy.ma.maskedarray.get_fill_value
numpy.ma.MaskedArray.harden_mask method ma.MaskedArray.harden_mask()[source] Force the mask to hard. Whether the mask of a masked array is hard or soft is determined by its hardmask property. harden_mask sets hardmask to True. See also ma.MaskedArray.hardmask
numpy.reference.generated.numpy.ma.maskedarray.harden_mask
numpy.ma.MaskedArray.ids method ma.MaskedArray.ids()[source] Return the addresses of the data and mask areas. Parameters None Examples >>> x = np.ma.array([1, 2, 3], mask=[0, 1, 1]) >>> x.ids() (166670640, 166659832) # may vary If the array has no mask, the address of nomask is returned. This address is typi...
numpy.reference.generated.numpy.ma.maskedarray.ids
numpy.ma.MaskedArray.iscontiguous method ma.MaskedArray.iscontiguous()[source] Return a boolean indicating whether the data is contiguous. Parameters None Examples >>> x = np.ma.array([1, 2, 3]) >>> x.iscontiguous() True iscontiguous returns one of the flags of the masked array: >>> x.flags C_CONTIGUOUS : ...
numpy.reference.generated.numpy.ma.maskedarray.iscontiguous
numpy.ma.MaskedArray.item method ma.MaskedArray.item(*args) Copy an element of an array to a standard Python scalar and return it. Parameters *argsArguments (variable number and type) none: in this case, the method only works for arrays with one element (a.size == 1), which element is copied into a standard ...
numpy.reference.generated.numpy.ma.maskedarray.item
numpy.ma.MaskedArray.itemsize attribute ma.MaskedArray.itemsize Length of one array element in bytes. Examples >>> x = np.array([1,2,3], dtype=np.float64) >>> x.itemsize 8 >>> x = np.array([1,2,3], dtype=np.complex128) >>> x.itemsize 16
numpy.reference.generated.numpy.ma.maskedarray.itemsize
numpy.ma.MaskedArray.max method ma.MaskedArray.max(axis=None, out=None, fill_value=None, keepdims=<no value>)[source] Return the maximum along a given axis. Parameters axis{None, int}, optional Axis along which to operate. By default, axis is None and the flattened input is used. outarray_like, optional A...
numpy.reference.generated.numpy.ma.maskedarray.max
numpy.ma.MaskedArray.mean method ma.MaskedArray.mean(axis=None, dtype=None, out=None, keepdims=<no value>)[source] Returns the average of the array elements along given axis. Masked entries are ignored, and result elements which are not finite will be masked. Refer to numpy.mean for full documentation. See also n...
numpy.reference.generated.numpy.ma.maskedarray.mean
numpy.ma.MaskedArray.min method ma.MaskedArray.min(axis=None, out=None, fill_value=None, keepdims=<no value>)[source] Return the minimum along a given axis. Parameters axis{None, int}, optional Axis along which to operate. By default, axis is None and the flattened input is used. outarray_like, optional A...
numpy.reference.generated.numpy.ma.maskedarray.min
numpy.ma.MaskedArray.nbytes attribute ma.MaskedArray.nbytes Total bytes consumed by the elements of the array. Notes Does not include memory consumed by non-element attributes of the array object. Examples >>> x = np.zeros((3,5,2), dtype=np.complex128) >>> x.nbytes 480 >>> np.prod(x.shape) * x.itemsize 480
numpy.reference.generated.numpy.ma.maskedarray.nbytes
numpy.ma.MaskedArray.ndim attribute ma.MaskedArray.ndim Number of array dimensions. Examples >>> x = np.array([1, 2, 3]) >>> x.ndim 1 >>> y = np.zeros((2, 3, 4)) >>> y.ndim 3
numpy.reference.generated.numpy.ma.maskedarray.ndim
numpy.ma.MaskedArray.nonzero method ma.MaskedArray.nonzero()[source] Return the indices of unmasked elements that are not zero. Returns a tuple of arrays, one for each dimension, containing the indices of the non-zero elements in that dimension. The corresponding non-zero values can be obtained with: a[a.nonzero()]...
numpy.reference.generated.numpy.ma.maskedarray.nonzero
numpy.ma.MaskedArray.prod method ma.MaskedArray.prod(axis=None, dtype=None, out=None, keepdims=<no value>)[source] Return the product of the array elements over the given axis. Masked elements are set to 1 internally for computation. Refer to numpy.prod for full documentation. See also numpy.ndarray.prod corresp...
numpy.reference.generated.numpy.ma.maskedarray.prod
numpy.ma.MaskedArray.product method ma.MaskedArray.product(axis=None, dtype=None, out=None, keepdims=<no value>)[source] Return the product of the array elements over the given axis. Masked elements are set to 1 internally for computation. Refer to numpy.prod for full documentation. See also numpy.ndarray.prod c...
numpy.reference.generated.numpy.ma.maskedarray.product
numpy.ma.MaskedArray.ptp method ma.MaskedArray.ptp(axis=None, out=None, fill_value=None, keepdims=False)[source] Return (maximum - minimum) along the given dimension (i.e. peak-to-peak value). Warning ptp preserves the data type of the array. This means the return value for an input of signed integers with n bits ...
numpy.reference.generated.numpy.ma.maskedarray.ptp
numpy.ma.MaskedArray.put method ma.MaskedArray.put(indices, values, mode='raise')[source] Set storage-indexed locations to corresponding values. Sets self._data.flat[n] = values[n] for each n in indices. If values is shorter than indices then it will repeat. If values has some masked values, the initial mask is upd...
numpy.reference.generated.numpy.ma.maskedarray.put
numpy.ma.MaskedArray.ravel method ma.MaskedArray.ravel(order='C')[source] Returns a 1D version of self, as a view. Parameters order{‘C’, ‘F’, ‘A’, ‘K’}, optional The elements of a are read using this index order. ‘C’ means to index the elements in C-like order, with the last axis index changing fastest, back ...
numpy.reference.generated.numpy.ma.maskedarray.ravel
numpy.ma.MaskedArray.repeat method ma.MaskedArray.repeat(repeats, axis=None)[source] Repeat elements of an array. Refer to numpy.repeat for full documentation. See also numpy.repeat equivalent function
numpy.reference.generated.numpy.ma.maskedarray.repeat
numpy.ma.MaskedArray.reshape method ma.MaskedArray.reshape(*s, **kwargs)[source] Give a new shape to the array without changing its data. Returns a masked array containing the same data, but with a new shape. The result is a view on the original array; if this is not possible, a ValueError is raised. Parameters ...
numpy.reference.generated.numpy.ma.maskedarray.reshape
numpy.ma.MaskedArray.resize method ma.MaskedArray.resize(newshape, refcheck=True, order=False)[source] Warning This method does nothing, except raise a ValueError exception. A masked array does not own its data and therefore cannot safely be resized in place. Use the numpy.ma.resize function instead. This method ...
numpy.reference.generated.numpy.ma.maskedarray.resize
numpy.ma.MaskedArray.round method ma.MaskedArray.round(decimals=0, out=None)[source] Return each element rounded to the given number of decimals. Refer to numpy.around for full documentation. See also numpy.ndarray.round corresponding function for ndarrays numpy.around equivalent function
numpy.reference.generated.numpy.ma.maskedarray.round
numpy.ma.MaskedArray.searchsorted method ma.MaskedArray.searchsorted(v, side='left', sorter=None) Find indices where elements of v should be inserted in a to maintain order. For full documentation, see numpy.searchsorted See also numpy.searchsorted equivalent function
numpy.reference.generated.numpy.ma.maskedarray.searchsorted
numpy.ma.MaskedArray.set_fill_value method ma.MaskedArray.set_fill_value(value=None)[source]
numpy.reference.generated.numpy.ma.maskedarray.set_fill_value
numpy.ma.MaskedArray.shrink_mask method ma.MaskedArray.shrink_mask()[source] Reduce a mask to nomask when possible. Parameters None Returns None Examples >>> x = np.ma.array([[1,2 ], [3, 4]], mask=[0]*4) >>> x.mask array([[False, False], [False, False]]) >>> x.shrink_mask() masked_array( data=[[1...
numpy.reference.generated.numpy.ma.maskedarray.shrink_mask
numpy.ma.MaskedArray.size attribute ma.MaskedArray.size Number of elements in the array. Equal to np.prod(a.shape), i.e., the product of the array’s dimensions. Notes a.size returns a standard arbitrary precision Python integer. This may not be the case with other methods of obtaining the same value (like the sugge...
numpy.reference.generated.numpy.ma.maskedarray.size
numpy.ma.MaskedArray.soften_mask method ma.MaskedArray.soften_mask()[source] Force the mask to soft. Whether the mask of a masked array is hard or soft is determined by its hardmask property. soften_mask sets hardmask to False. See also ma.MaskedArray.hardmask
numpy.reference.generated.numpy.ma.maskedarray.soften_mask
numpy.ma.MaskedArray.sort method ma.MaskedArray.sort(axis=- 1, kind=None, order=None, endwith=True, fill_value=None)[source] Sort the array, in-place Parameters aarray_like Array to be sorted. axisint, optional Axis along which to sort. If None, the array is flattened before sorting. The default is -1, wh...
numpy.reference.generated.numpy.ma.maskedarray.sort
numpy.ma.MaskedArray.squeeze method ma.MaskedArray.squeeze(axis=None)[source] Remove axes of length one from a. Refer to numpy.squeeze for full documentation. See also numpy.squeeze equivalent function
numpy.reference.generated.numpy.ma.maskedarray.squeeze
numpy.ma.MaskedArray.std method ma.MaskedArray.std(axis=None, dtype=None, out=None, ddof=0, keepdims=<no value>)[source] Returns the standard deviation of the array elements along given axis. Masked entries are ignored. Refer to numpy.std for full documentation. See also numpy.ndarray.std corresponding function ...
numpy.reference.generated.numpy.ma.maskedarray.std
numpy.ma.MaskedArray.strides attribute ma.MaskedArray.strides Tuple of bytes to step in each dimension when traversing an array. The byte offset of element (i[0], i[1], ..., i[n]) in an array a is: offset = sum(np.array(i) * a.strides) A more detailed explanation of strides can be found in the “ndarray.rst” file i...
numpy.reference.generated.numpy.ma.maskedarray.strides
numpy.ma.MaskedArray.sum method ma.MaskedArray.sum(axis=None, dtype=None, out=None, keepdims=<no value>)[source] Return the sum of the array elements over the given axis. Masked elements are set to 0 internally. Refer to numpy.sum for full documentation. See also numpy.ndarray.sum corresponding function for ndar...
numpy.reference.generated.numpy.ma.maskedarray.sum
numpy.ma.MaskedArray.swapaxes method ma.MaskedArray.swapaxes(axis1, axis2)[source] Return a view of the array with axis1 and axis2 interchanged. Refer to numpy.swapaxes for full documentation. See also numpy.swapaxes equivalent function
numpy.reference.generated.numpy.ma.maskedarray.swapaxes
numpy.ma.MaskedArray.take method ma.MaskedArray.take(indices, axis=None, out=None, mode='raise')[source]
numpy.reference.generated.numpy.ma.maskedarray.take
numpy.ma.MaskedArray.tobytes method ma.MaskedArray.tobytes(fill_value=None, order='C')[source] Return the array data as a string containing the raw bytes in the array. The array is filled with a fill value before the string conversion. New in version 1.9.0. Parameters fill_valuescalar, optional Value used t...
numpy.reference.generated.numpy.ma.maskedarray.tobytes
numpy.ma.MaskedArray.tofile method ma.MaskedArray.tofile(fid, sep='', format='%s')[source] Save a masked array to a file in binary format. Warning This function is not implemented yet. Raises NotImplementedError When tofile is called.
numpy.reference.generated.numpy.ma.maskedarray.tofile
numpy.ma.MaskedArray.toflex method ma.MaskedArray.toflex()[source] Transforms a masked array into a flexible-type array. The flexible type array that is returned will have two fields: the _data field stores the _data part of the array. the _mask field stores the _mask part of the array. Parameters None Retur...
numpy.reference.generated.numpy.ma.maskedarray.toflex
numpy.ma.MaskedArray.tolist method ma.MaskedArray.tolist(fill_value=None)[source] Return the data portion of the masked array as a hierarchical Python list. Data items are converted to the nearest compatible Python type. Masked values are converted to fill_value. If fill_value is None, the corresponding entries in ...
numpy.reference.generated.numpy.ma.maskedarray.tolist
numpy.ma.MaskedArray.torecords method ma.MaskedArray.torecords()[source] Transforms a masked array into a flexible-type array. The flexible type array that is returned will have two fields: the _data field stores the _data part of the array. the _mask field stores the _mask part of the array. Parameters None ...
numpy.reference.generated.numpy.ma.maskedarray.torecords
numpy.ma.MaskedArray.tostring method ma.MaskedArray.tostring(fill_value=None, order='C')[source] A compatibility alias for tobytes, with exactly the same behavior. Despite its name, it returns bytes not strs. Deprecated since version 1.19.0.
numpy.reference.generated.numpy.ma.maskedarray.tostring
numpy.ma.MaskedArray.trace method ma.MaskedArray.trace(offset=0, axis1=0, axis2=1, dtype=None, out=None)[source] Return the sum along diagonals of the array. Refer to numpy.trace for full documentation. See also numpy.trace equivalent function
numpy.reference.generated.numpy.ma.maskedarray.trace
numpy.ma.MaskedArray.transpose method ma.MaskedArray.transpose(*axes)[source] Returns a view of the array with axes transposed. For a 1-D array this has no effect, as a transposed vector is simply the same vector. To convert a 1-D array into a 2D column vector, an additional dimension must be added. np.atleast2d(a)...
numpy.reference.generated.numpy.ma.maskedarray.transpose
numpy.ma.MaskedArray.unshare_mask method ma.MaskedArray.unshare_mask()[source] Copy the mask and set the sharedmask flag to False. Whether the mask is shared between masked arrays can be seen from the sharedmask property. unshare_mask ensures the mask is not shared. A copy of the mask is only made if it was shared....
numpy.reference.generated.numpy.ma.maskedarray.unshare_mask
numpy.ma.MaskedArray.var method ma.MaskedArray.var(axis=None, dtype=None, out=None, ddof=0, keepdims=<no value>)[source] Compute the variance along the specified axis. Returns the variance of the array elements, a measure of the spread of a distribution. The variance is computed for the flattened array by default, ...
numpy.reference.generated.numpy.ma.maskedarray.var
numpy.ma.MaskedArray.view method ma.MaskedArray.view(dtype=None, type=None, fill_value=None)[source] Return a view of the MaskedArray data. Parameters dtypedata-type or ndarray sub-class, optional Data-type descriptor of the returned view, e.g., float32 or int16. The default, None, results in the view having ...
numpy.reference.generated.numpy.ma.maskedarray.view
numpy.ma.max ma.max(obj, axis=None, out=None, fill_value=None, keepdims=<no value>)[source] Return the maximum along a given axis. Parameters axis{None, int}, optional Axis along which to operate. By default, axis is None and the flattened input is used. outarray_like, optional Alternative output array in...
numpy.reference.generated.numpy.ma.max
numpy.ma.maximum_fill_value ma.maximum_fill_value(obj)[source] Return the minimum value that can be represented by the dtype of an object. This function is useful for calculating a fill value suitable for taking the maximum of an array with a given dtype. Parameters objndarray, dtype or scalar An object that ...
numpy.reference.generated.numpy.ma.maximum_fill_value
numpy.ma.mean ma.mean(self, axis=None, dtype=None, out=None, keepdims=<no value>) = <numpy.ma.core._frommethod object> Returns the average of the array elements along given axis. Masked entries are ignored, and result elements which are not finite will be masked. Refer to numpy.mean for full documentation. See als...
numpy.reference.generated.numpy.ma.mean
numpy.ma.median ma.median(a, axis=None, out=None, overwrite_input=False, keepdims=False)[source] Compute the median along the specified axis. Returns the median of the array elements. Parameters aarray_like Input array or object that can be converted to an array. axisint, optional Axis along which the med...
numpy.reference.generated.numpy.ma.median
numpy.ma.min ma.min(obj, axis=None, out=None, fill_value=None, keepdims=<no value>)[source] Return the minimum along a given axis. Parameters axis{None, int}, optional Axis along which to operate. By default, axis is None and the flattened input is used. outarray_like, optional Alternative output array in...
numpy.reference.generated.numpy.ma.min
numpy.ma.minimum_fill_value ma.minimum_fill_value(obj)[source] Return the maximum value that can be represented by the dtype of an object. This function is useful for calculating a fill value suitable for taking the minimum of an array with a given dtype. Parameters objndarray, dtype or scalar An object that ...
numpy.reference.generated.numpy.ma.minimum_fill_value
numpy.ma.mr_ ma.mr_ = <numpy.ma.extras.mr_class object> Translate slice objects to concatenation along the first axis. This is the masked array version of lib.index_tricks.RClass. See also lib.index_tricks.RClass Examples >>> np.ma.mr_[np.ma.array([1,2,3]), 0, 0, np.ma.array([4,5,6])] masked_array(data=[1, 2, 3...
numpy.reference.generated.numpy.ma.mr_
numpy.ma.nonzero ma.nonzero(self) = <numpy.ma.core._frommethod object> Return the indices of unmasked elements that are not zero. Returns a tuple of arrays, one for each dimension, containing the indices of the non-zero elements in that dimension. The corresponding non-zero values can be obtained with: a[a.nonzero(...
numpy.reference.generated.numpy.ma.nonzero
numpy.ma.notmasked_contiguous ma.notmasked_contiguous(a, axis=None)[source] Find contiguous unmasked data in a masked array along the given axis. Parameters aarray_like The input array. axisint, optional Axis along which to perform the operation. If None (default), applies to a flattened version of the ar...
numpy.reference.generated.numpy.ma.notmasked_contiguous
numpy.ma.notmasked_edges ma.notmasked_edges(a, axis=None)[source] Find the indices of the first and last unmasked values along an axis. If all values are masked, return None. Otherwise, return a list of two tuples, corresponding to the indices of the first and last unmasked values respectively. Parameters aarra...
numpy.reference.generated.numpy.ma.notmasked_edges
numpy.ma.ones ma.ones(shape, dtype=None, order='C') = <numpy.ma.core._convert2ma object> Return a new array of given shape and type, filled with ones. Parameters shapeint or sequence of ints Shape of the new array, e.g., (2, 3) or 2. dtypedata-type, optional The desired data-type for the array, e.g., nump...
numpy.reference.generated.numpy.ma.ones
numpy.ma.ones_like ma.ones_like(*args, **kwargs) = <numpy.ma.core._convert2ma object> Return an array of ones with the same shape and type as a given array. Parameters aarray_like The shape and data-type of a define these same attributes of the returned array. dtypedata-type, optional Overrides the data t...
numpy.reference.generated.numpy.ma.ones_like
numpy.ma.outer ma.outer(a, b)[source] Compute the outer product of two vectors. Given two vectors, a = [a0, a1, ..., aM] and b = [b0, b1, ..., bN], the outer product [1] is: [[a0*b0 a0*b1 ... a0*bN ] [a1*b0 . [ ... . [aM*b0 aM*bN ]] Parameters a(M,) array_like First input vector. I...
numpy.reference.generated.numpy.ma.outer
numpy.ma.outerproduct ma.outerproduct(a, b)[source] Compute the outer product of two vectors. Given two vectors, a = [a0, a1, ..., aM] and b = [b0, b1, ..., bN], the outer product [1] is: [[a0*b0 a0*b1 ... a0*bN ] [a1*b0 . [ ... . [aM*b0 aM*bN ]] Parameters a(M,) array_like First i...
numpy.reference.generated.numpy.ma.outerproduct
numpy.ma.polyfit ma.polyfit(x, y, deg, rcond=None, full=False, w=None, cov=False)[source] Least squares polynomial fit. Note This forms part of the old polynomial API. Since version 1.4, the new polynomial API defined in numpy.polynomial is preferred. A summary of the differences can be found in the transition gui...
numpy.reference.generated.numpy.ma.polyfit
numpy.ma.power ma.power(a, b, third=None)[source] Returns element-wise base array raised to power from second array. This is the masked array version of numpy.power. For details see numpy.power. See also numpy.power Notes The out argument to numpy.power is not supported, third has to be None.
numpy.reference.generated.numpy.ma.power