MaskedArray.torecords()

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 Returns: record : ndarray A new flexible-type ndarray with two fields: the first element containing a value, the second element containing the corresponding mask boolean. The returned record shape matches self.shape. N

MaskedArray.tolist()

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 the output list will be None. Parameters: fill_value : scalar, optional The value to use for invalid entries. Default is None. Returns: result : list The Python list representation of the masked array. Exampl

MaskedArray.toflex()

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 Returns: record : ndarray A new flexible-type ndarray with two fields: the first element containing a value, the second element containing the corresponding mask boolean. The returned record shape matches self.shape. Note

MaskedArray.tofile()

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.

MaskedArray.tobytes()

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_value : scalar, optional Value used to fill in the masked values. Deafult is None, in which case MaskedArray.fill_value is used. order : {?C?,?F?,?A?}, optional Order of the data item in the copy. Default is ?C?. ?C? ? C order (row major). ?F? ? Fortra

MaskedArray.take()

MaskedArray.take(indices, axis=None, out=None, mode='raise') [source]

MaskedArray.T

MaskedArray.T

MaskedArray.swapaxes()

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

MaskedArray.sum()

MaskedArray.sum(axis=None, dtype=None, out=None) [source] Return the sum of the array elements over the given axis. Masked elements are set to 0 internally. Parameters: axis : {None, -1, int}, optional Axis along which the sum is computed. The default (axis = None) is to compute over the flattened array. dtype : {None, dtype}, optional Determines the type of the returned array and of the accumulator where the elements are summed. If dtype has the value None and the type of a is an integ

MaskedArray.strides

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 in the NumPy reference guide. See also numpy.lib.stride_tricks.as_strided Notes Imagine an array of 32-bit integers (each 4 bytes): x = np.array([[0, 1, 2, 3, 4], [5, 6, 7, 8, 9]], dtype=np.int32) This arr