Skip to content

Commit da0bd6c

Browse files
committed
Fix power to zero with python3.5 and numpy 1.11.2
1 parent dc696d6 commit da0bd6c

3 files changed

Lines changed: 2 additions & 2 deletions

File tree

quantities/dimensionality.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -320,6 +320,7 @@ def _d_copy(q1, out=None):
320320
p_dict[np.conjugate] = _d_copy
321321
p_dict[np.negative] = _d_copy
322322
p_dict[np.ones_like] = _d_copy
323+
p_dict[np.core.umath._ones_like] = _d_copy
323324
p_dict[np.rint] = _d_copy
324325
p_dict[np.floor] = _d_copy
325326
p_dict[np.fix] = _d_copy

quantities/quantity.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -318,7 +318,7 @@ def __rdiv__(self, other):
318318
@with_doc(np.ndarray.__pow__)
319319
@check_uniform
320320
def __pow__(self, other):
321-
return super(Quantity, self).__pow__(other)
321+
return np.power(self, other)
322322

323323
@with_doc(np.ndarray.__ipow__)
324324
@check_uniform

quantities/unitquantity.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -514,4 +514,3 @@ def set_default_units(
514514
UnitSubstance.set_default_unit(substance)
515515
UnitTemperature.set_default_unit(temperature)
516516
UnitTime.set_default_unit(time)
517-

0 commit comments

Comments
 (0)