From e2998f8b0dbedc9bc56530ff2fc682d72a0b84ff Mon Sep 17 00:00:00 2001 From: Pradeep Reddy Raamana Date: Fri, 23 Aug 2019 09:45:13 -0400 Subject: renamed the input arg to remove hint it is geared for numbers --- numpy/core/numeric.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'numpy/core/numeric.py') 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') -- cgit v1.2.1