相关疑难解决方法(0)

Python float和numpy float32之间的区别

内置float和有numpy.float32什么区别?

a = 58682.7578125
print type(a)
print a
print type(numpy.float32(a))
print numpy.float32(a)
Run Code Online (Sandbox Code Playgroud)

输出:

<type 'float'>
58682.7578125
<type 'numpy.float32'>
58682.8
Run Code Online (Sandbox Code Playgroud)

我在这里发现的numpy.float32是:

float32单精度浮点数:符号位,8位指数,23位尾数

没有找到内置float格式的内容.

python numpy

29
推荐指数
1
解决办法
5万
查看次数

标签 统计

numpy ×1

python ×1