diff options
author | Pradeep Reddy Raamana <raamana@gmail.com> | 2019-08-23 09:45:13 -0400 |
---|---|---|
committer | Pradeep Reddy Raamana <raamana@gmail.com> | 2019-08-23 09:45:13 -0400 |
commit | e2998f8b0dbedc9bc56530ff2fc682d72a0b84ff (patch) | |
tree | 2dfc5e8ed1452cd635fb53320a4ebd5e18c1240b /numpy/core | |
parent | 4246ce2a391314acc1da90d56ff4f995d45e18a9 (diff) | |
download | numpy-e2998f8b0dbedc9bc56530ff2fc682d72a0b84ff.tar.gz |
renamed the input arg to remove hint it is geared for numbers
Diffstat (limited to 'numpy/core')
-rw-r--r-- | numpy/core/numeric.py | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/numpy/core/numeric.py b/numpy/core/numeric.py index 8ada87b9f..0b16ba03a 100644 --- a/numpy/core/numeric.py +++ b/numpy/core/numeric.py @@ -1772,19 +1772,19 @@ def _frombuffer(buf, dtype, shape, order): @set_module('numpy') -def isscalar(num): +def isscalar(element): """ - Returns True if the type of `num` is a scalar type. + Returns True if the type of `element` is a scalar type. Parameters ---------- - num : any + element : any Input argument, can be of any type and shape. Returns ------- val : bool - True if `num` is a scalar type, False if it is not. + True if `element` is a scalar type, False if it is not. See Also -------- @@ -1843,9 +1843,9 @@ def isscalar(num): True """ - return (isinstance(num, generic) - or type(num) in ScalarType - or isinstance(num, numbers.Number)) + return (isinstance(element, generic) + or type(element) in ScalarType + or isinstance(element, numbers.Number)) @set_module('numpy') |