Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents af4bebb + e46044d commit f30470cCopy full SHA for f30470c
galleries/examples/units/basic_units.py
@@ -146,10 +146,10 @@ def __getattribute__(self, name):
146
return getattr(variable, name)
147
return object.__getattribute__(self, name)
148
149
- def __array__(self, dtype=object):
+ def __array__(self, dtype=object, copy=False):
150
return np.asarray(self.value, dtype)
151
152
- def __array_wrap__(self, array, context):
+ def __array_wrap__(self, array, context=None, return_scalar=False):
153
return TaggedValue(array, self.unit)
154
155
def __repr__(self):
@@ -222,10 +222,10 @@ def __mul__(self, rhs):
222
def __rmul__(self, lhs):
223
return self*lhs
224
225
226
return TaggedValue(array, self)
227
228
- def __array__(self, t=None, context=None):
+ def __array__(self, t=None, context=None, copy=False):
229
ret = np.array(1)
230
if t is not None:
231
return ret.astype(t)
0 commit comments