3535from ..extern .six .moves import copyreg , zip
3636from ..table import Table
3737from ..units import Quantity , UnitBase , UnitsError , dimensionless_unscaled
38+ from ..units .utils import quantity_asanyarray
3839from ..utils import (sharedmethod , find_current_module ,
3940 InheritDocstrings , OrderedDescriptorContainer ,
4041 check_broadcast , IncompatibleShapeError )
@@ -1455,7 +1456,8 @@ def _initialize_parameters(self, args, kwargs):
14551456 if arg is None :
14561457 # A value of None implies using the default value, if exists
14571458 continue
1458- params [self .param_names [idx ]] = np .asanyarray (arg , dtype = np .float )
1459+ params [self .param_names [idx ]] = quantity_asanyarray (arg , dtype = np .float )
1460+
14591461
14601462 # At this point the only remaining keyword arguments should be
14611463 # parameter names; any others are in error.
@@ -1469,7 +1471,7 @@ def _initialize_parameters(self, args, kwargs):
14691471 if value is None :
14701472 continue
14711473 else :
1472- params [param_name ] = np . asanyarray (value , dtype = np .float )
1474+ params [param_name ] = quantity_asanyarray (value , dtype = np .float )
14731475
14741476 if kwargs :
14751477 # If any keyword arguments were left over at this point they are
0 commit comments