(self, obj)
| 132 | return self |
| 133 | |
| 134 | def __array_finalize__(self, obj): |
| 135 | # Make sure we have a _fieldmask by default |
| 136 | _mask = getattr(obj, '_mask', None) |
| 137 | if _mask is None: |
| 138 | objmask = getattr(obj, '_mask', ma.nomask) |
| 139 | _dtype = np.ndarray.__getattribute__(self, 'dtype') |
| 140 | if objmask is ma.nomask: |
| 141 | _mask = ma.make_mask_none(self.shape, dtype=_dtype) |
| 142 | else: |
| 143 | mdescr = ma.make_mask_descr(_dtype) |
| 144 | _mask = np.array([tuple([m] * len(mdescr)) for m in objmask], |
| 145 | dtype=mdescr).view(np.recarray) |
| 146 | # Update some of the attributes |
| 147 | _dict = self.__dict__ |
| 148 | _dict.update(_mask=_mask) |
| 149 | self._update_from(obj) |
| 150 | if _dict['_baseclass'] == np.ndarray: |
| 151 | _dict['_baseclass'] = np.recarray |
| 152 | |
| 153 | @property |
| 154 | def _data(self): |
nothing calls this directly
no test coverage detected