[英]How to change floating point precision in Python?
I want to change my numpy array floating point resolution so it can only have 2 decimal places.我想更改我的 numpy 数组浮点分辨率,使其只能有 2 位小数。 Not to print out the value to the command window but the way the value is actually represented in memory!
不是将值打印到命令 window 而是该值在内存中实际表示的方式!
numpy.round(your_array,2)
Should make it应该做到
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.