Incorporated correction luke suggested
This commit is contained in:
parent
770ce06dc1
commit
ef4ca9e9ea
@ -357,9 +357,12 @@ class MetaArray(object):
|
||||
else:
|
||||
return np.array(self._data)
|
||||
|
||||
def __array__(self):
|
||||
def __array__(self, dtype=None):
|
||||
## supports np.array(metaarray_instance)
|
||||
if dtype is None:
|
||||
return self.asarray()
|
||||
else:
|
||||
return self.asarray().astype(dtype)
|
||||
|
||||
def view(self, typ):
|
||||
## deprecated; kept for backward compatibility
|
||||
|
Loading…
Reference in New Issue
Block a user