set_printoptions(precision=None, threshold=None, edgeitems=None, linewidth=None, suppress=None, nanstr=None,
infstr=None)
对于每个属性的释义:
precision : int, optional,float输出的精度,即小数点后维数,默认8( Number of digits of precision for floating point output (default 8))
threshold : int,可选,当数组数量过多时,设置几个显示的数字,其余使用省略号(触发汇总而不是完整repr的数组元素总数(默认1000))
edgeitems : int, optional,边缘数目(Number of array items in summary at beginning and end of each dimension (default 3))
linewidth : int, optional,The number of characters per line for the purpose of inserting line breaks (default 75)
suppress : bool, optional,是否压缩由科学计数法表示的浮点数(Whether or not suppress printing of small floating point values using scientific notation (default False))
nanstr : str, optional,String representation of floating point not-a-number (default nan)
infstr : str, optional,String representation of floating point infinity (default inf)
实例:
np.set_printoptions(threshold='nan') (意思是全部打印)
本文为原创文章,版权归知行编程网所有,欢迎分享本文,转载请保留出处!
你可能也喜欢
- ♥ python自带pip用不了怎么办?11/03
- ♥ calendar可以在python3时间生成日历吗?01/12
- ♥ python数据类型转换注意事项01/11
- ♥ windows无法启动mongodb服务如何解决11/03
- ♥ 如何在python函数中传递参数位置10/10
- ♥ 在 Python 中运行程序的三种方法09/15
内容反馈