You are viewing an older version (2.4.3). Go to latest (2.4.4)
{ } Raw JSON

bundles / numpy 2.4.3 / numpy / issctype

function

numpy:issctype

source: /numpy/_core/numerictypes.py :191

Signature

def   issctype ( rep )

Summary

Determines whether the given object represents a scalar data-type.

Parameters

rep : any

If rep is an instance of a scalar dtype, True is returned. If not, False is returned.

Returns

out : bool

Boolean result of check whether rep is a scalar dtype.

Examples

from numpy._core.numerictypes import issctype
issctype(np.int32)
issctype(list)
issctype(1.1)
Strings are also a scalar type:
issctype(np.dtype('str'))

See also

issubdtype
issubsctype
obj2sctype
sctype2char

Aliases

  • numpy._core.numerictypes.issctype