How to subclass numpy.`ma.core.masked_array`?
问题 I'm trying to write a subclass a masked_array . What I've got so far is this: class gridded_array(ma.core.masked_array): def __init__(self, data, dimensions, mask=False, dtype=None, copy=False, subok=True, ndmin=0, fill_value=None, keep_mask=True, hard_mask=None, shrink=True): ma.core.masked_array.__init__(data, mask, dtype, copy, subok, ndmin, fill_value, keep_mask, hard_mask, shrink) self.dimensions = dimensions However, when now I create a gridded_array , I don't get what I expect: dims =