Merge pull request #1082 from pyqtgraph/revert-360-develop

Redo "Allow MetaArray.__array__ to accept an optional dtype arg"
This commit is contained in:
Ogi Moore 2019-11-25 06:52:44 -08:00 committed by GitHub
commit db483f8ec2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -359,7 +359,10 @@ class MetaArray(object):
def __array__(self, dtype=None):
## 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):
## deprecated; kept for backward compatibility