class documentation

class MaskedRecords(MaskedArray): (source)

View In Hierarchy

Method __array_finalize__ Undocumented
Method __getattribute__ Undocumented
Method __getitem__ Returns all the fields sharing the same fieldname base.
Method __getstate__ Return the internal state of the masked array.
Method __len__ Returns the length
Method __new__ Undocumented
Method __reduce__ Return a 3-tuple for pickling a MaskedArray.
Method __repr__ Calculates the repr representation.
Method __setattr__ Sets the attribute attr to the value val.
Method __setitem__ Sets the given record to value.
Method __setstate__ Restore the internal state of the masked array.
Method __str__ Calculates the string representation.
Method copy Returns a copy of the masked record.
Method harden_mask Forces the mask to hard.
Method soften_mask Forces the mask to soft
Method tolist Return the data portion of the array as a list.
Method view Returns a view of the mrecarray.
Instance Variable fill_value Undocumented
Instance Variable _fill_value Filling values for each field.
Instance Variable _hardmask Undocumented
Instance Variable _mask Mask of the records. A record is masked when all its fields are masked.
Property _data Returns the data as a recarray.
Property _fieldmask Alias to mask.
def __array_finalize__(self, obj): (source)

Undocumented

def __getattribute__(self, attr): (source)

Undocumented

def __getitem__(self, indx): (source)

Returns all the fields sharing the same fieldname base.

The fieldname base is either _data or _mask.

def __getstate__(self): (source)

Return the internal state of the masked array.

This is for pickling.

def __len__(self): (source)

Returns the length

def __new__(cls, shape, dtype=None, buf=None, offset=0, strides=None, formats=None, names=None, titles=None, byteorder=None, aligned=False, mask=nomask, hard_mask=False, fill_value=None, keep_mask=True, copy=False, **options): (source)

Undocumented

def __reduce__(self): (source)

Return a 3-tuple for pickling a MaskedArray.

def __repr__(self): (source)

Calculates the repr representation.

def __setattr__(self, attr, val): (source)

Sets the attribute attr to the value val.

def __setitem__(self, indx, value): (source)

Sets the given record to value.

def __setstate__(self, state): (source)

Restore the internal state of the masked array.

This is for pickling. 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 string for the data
  • a binary string for the mask.
def __str__(self): (source)

Calculates the string representation.

def copy(self): (source)

Returns a copy of the masked record.

def harden_mask(self): (source)

Forces the mask to hard.

def soften_mask(self): (source)

Forces the mask to soft

def tolist(self, fill_value=None): (source)

Return the data portion of the array as a 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.

def view(self, dtype=None, type=None): (source)

Returns a view of the mrecarray.

fill_value = (source)

Undocumented

_fill_value: record = (source)

Filling values for each field.

_hardmask: bool = (source)

Undocumented

_mask: boolean array = (source)

Mask of the records. A record is masked when all its fields are masked.

Returns the data as a recarray.

Alias to mask.