Skip to content

Commit 1bd7e75

Browse files
committed
Propagate keyword arguments in astype
1 parent 5d8eaf3 commit 1bd7e75

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎quantities/quantity.py‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -214,9 +214,9 @@ def rescale(self, units):
214214
return Quantity(cf*self.magnitude, to_u)
215215

216216
@with_doc(np.ndarray.astype)
217-
def astype(self, dtype=None):
217+
def astype(self, dtype=None, **kwargs):
218218
'''Scalars are returned as scalar Quantity arrays.'''
219-
ret = super(Quantity, self.view(Quantity)).astype(dtype)
219+
ret = super(Quantity, self.view(Quantity)).astype(dtype, **kwargs)
220220
# scalar quantities get converted to plain numbers, so we fix it
221221
# might be related to numpy ticket # 826
222222
if not isinstance(ret, type(self)):

0 commit comments

Comments
 (0)