numpy.ma..mrecords
Defines the equivalent of numpy.recarrays
for masked arrays,
where fields can be accessed as attributes.
Note that numpy.ma.MaskedArray
already supports structured datatypes
and the masking of individual fields.
Variable | reserved_fields |
Undocumented |
Class | MaskedRecords |
No summary |
Function | _checknames |
Checks that field names descr are not reserved keywords. |
Function | _get_fieldmask |
Undocumented |
Function | _guessvartypes |
Tries to guess the dtypes of the str_ ndarray arr . |
Function | _mrreconstruct |
Build a new MaskedArray from the information stored in a pickle. |
Function | addfield |
Adds a new field to the masked record array |
Function | fromarrays |
Creates a mrecarray from a (flat) list of masked arrays. |
Function | fromrecords |
Creates a MaskedRecords from a list of records. |
Function | fromtextfile |
Creates a mrecarray from data stored in the file filename . |
Function | openfile |
Opens the file handle of file fname . |
Checks that field names descr are not reserved keywords.
If this is the case, a default 'f%i' is substituted. If the argument
names
is not None, updates the field names to valid names.
Tries to guess the dtypes of the str_ ndarray arr
.
Guesses by testing element-wise conversion. Returns a list of dtypes. The array is first converted to ndarray. If the array is 2D, the test is performed on the first line. An exception is raised if the file is 3D or more.
Adds a new field to the masked record array
Uses newfield
as data and newfieldname
as name. If newfieldname
is None, the new field name is set to 'fi', where i
is the number of
existing fields.
Creates a mrecarray from a (flat) list of masked arrays.
Lists of tuples should be preferred over lists of lists for faster processing.
Creates a MaskedRecords from a list of records.
Lists of tuples should be preferred over lists of lists for faster processing.
Creates a mrecarray from data stored in the file filename
.
Ultra simple: the varnames are in the header, one line