Skip to content

Commit

Permalink
Merge pull request pyqtgraph#1082 from pyqtgraph/revert-360-develop
Browse files Browse the repository at this point in the history
Redo "Allow MetaArray.__array__ to accept an optional dtype arg"
  • Loading branch information
j9ac9k authored Nov 25, 2019
2 parents 99b9d7b + ef4ca9e commit db483f8
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion pyqtgraph/metaarray/MetaArray.py
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,10 @@ def asarray(self):

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
Expand Down

0 comments on commit db483f8

Please sign in to comment.