数据类型相关
方法 |
描述 |
can_cast(from_, to[, casting]) |
如果根据强制转换规则可以在数据类型之间进行强制转换,则返回True。 |
promote_types(type1, type2) |
返回Type1和Type2都可以安全强制转换为的最小大小和最小标量种类的数据类型。 |
min_scalar_type(a) |
对于标量a,返回具有最小大小和可以保存其值的最小标量种类的数据类型。 |
result_type(*arrays_and_dtypes) |
返回将NumPy类型提升规则应用于参数而得到的类型。 |
common_type(*arrays) |
返回输入数组通用的标量类型。 |
obj2sctype(rep[, default]) |
返回对象的Python类型的标量dtype或NumPy等效值。 |
创建数据类型
方法 |
描述 |
dtype(obj[, align, copy]) |
创建数据类型对象。 |
format_parser(formats, names, titles[, …]) |
类将格式、名称、标题说明转换为dtype。 |
数据类型信息
方法 |
描述 |
finfo(dtype) |
浮点类型的机器限制。 |
iinfo(type) |
整数类型的机器限制。 |
MachAr([float_conv, int_conv, …]) |
诊断机器参数。 |
数据类型测试
杂项