内置float
和numpy.float32
有什么不同?
示例
a = 58682.7578125
print type(a)
print a
print type(numpy.float32(a))
print numpy.float32(a)
输出:
<type 'float'>
58682.7578125
<type 'numpy.float32'>
58682.8
我找到了numpy.float32
的here:
float32单精度浮点数:符号位、8位指数、23位尾数
找不到内置的float
格式。
发布于 2013-06-06 21:56:35
Python的标准float
类型是C double
:http://docs.python.org/2/library/stdtypes.html#typesnumeric
NumPy的标准numpy.float
是相同的,也是与numpy.float64
相同的。
https://stackoverflow.com/questions/16963956
复制相似问题