Merge pull request #1082 from pyqtgraph/revert-360-develop
Redo "Allow MetaArray.__array__ to accept an optional dtype arg"
This commit is contained in:
commit
db483f8ec2
|
@ -359,7 +359,10 @@ class MetaArray(object):
|
||||||
|
|
||||||
def __array__(self, dtype=None):
|
def __array__(self, dtype=None):
|
||||||
## supports np.array(metaarray_instance)
|
## supports np.array(metaarray_instance)
|
||||||
return self.asarray()
|
if dtype is None:
|
||||||
|
return self.asarray()
|
||||||
|
else:
|
||||||
|
return self.asarray().astype(dtype)
|
||||||
|
|
||||||
def view(self, typ):
|
def view(self, typ):
|
||||||
## deprecated; kept for backward compatibility
|
## deprecated; kept for backward compatibility
|
||||||
|
|
Loading…
Reference in New Issue
Block a user