Data type routines

methoddescription
can_castopen in new window(from_, to[, casting])Returns True if cast between data types can occur according to the casting rule.
promote_typesopen in new window(type1, type2)Returns the data type with the smallest size and smallest scalar kind to which both type1 and type2 may be safely cast.
min_scalar_typeopen in new window(a)For scalar a, returns the data type with the smallest size and smallest scalar kind which can hold its value.
result_typeopen in new window(*arrays_and_dtypes)Returns the type that results from applying the NumPy type promotion rules to the arguments.
common_typeopen in new window(*arrays)Return a scalar type which is common to the input arrays.
obj2sctypeopen in new window(rep[, default])Return the scalar dtype or NumPy equivalent of Python type of an object.

Creating data types

methoddescription
dtypeopen in new window(obj[, align, copy])Create a data type object.
format_parseropen in new window(formats, names, titles[, …])Class to convert formats, names, titles description to a dtype.

Data type information

methoddescription
finfoopen in new window(dtype)Machine limits for floating point types.
iinfoopen in new window(type)Machine limits for integer types.
MachAropen in new window([float_conv, int_conv, …])Diagnosing machine parameters.

Data type testing

methoddescription
issctypeopen in new window(rep)Determines whether the given object represents a scalar data-type.
issubdtypeopen in new window(arg1, arg2)Returns True if first argument is a typecode lower/equal in type hierarchy.
issubsctypeopen in new window(arg1, arg2)Determine if the first argument is a subclass of the second argument.
issubclass_open in new window(arg1, arg2)Determine if a class is a subclass of a second class.
find_common_typeopen in new window(array_types, scalar_types)Determine common type following standard coercion rules.

Miscellaneous

methoddescription
typenameopen in new window(char)Return a description for the given data type code.
sctype2charopen in new window(sctype)Return the string representation of a scalar dtype.
mintypecodeopen in new window(typechars[, typeset, default])Return the character for the minimum-size type to which given types can be safely cast.
maximum_sctypeopen in new window(t)Return the scalar type of highest precision of the same kind as the input.