Data type routines

can_cast(fromtype, totype) Returns True if cast between data types can occur without losing precision.
common_type(*arrays) Return a scalar type which is common to the input arrays.
obj2sctype(rep[, default])

Creating data types

dtype Create a data type object.
format_parser(formats, names, titles[, ...]) Class to convert formats, names, titles description to a dtype.

Data type information

finfo Machine limits for floating point types.
iinfo(type) Machine limits for integer types.
MachAr([float_conv, int_conv, ...]) Diagnosing machine parameters.

Data type testing

issctype(rep) Determines whether the given object represents a scalar data-type.
issubdtype(arg1, arg2) Returns True if first argument is a typecode lower/equal in type hierarchy.
issubsctype(arg1, arg2) Determine if the first argument is a subclass of the second argument.
issubclass_(arg1, arg2)
find_common_type(array_types, scalar_types) Determine common type following standard coercion rules.


typename(char) Return a description for the given data type code.
sctype2char(sctype) Return the string representation of a scalar dtype.
mintypecode(typechars[, typeset, default]) Return the character for the minimum-size type to which given types can be safely cast.

Table Of Contents

Previous topic

Next topic


This Page