dpnp.isscalar

dpnp.isscalar(element)[source]

Returns True if the type of element is a scalar type.

For full documentation refer to numpy.isscalar.

Parameters:
elementany

Input argument, can be of any type and shape.

Returns:
outbool

True if element is a scalar type, False if it is not.

Examples

>>> import dpnp as np
>>> np.isscalar(3.1)
True
>>> np.isscalar(np.array(3.1))
False
>>> np.isscalar([3.1])
False
>>> np.isscalar(False)
True
>>> np.isscalar("dpnp")
True