Printing numpy.float64 with full precision

前端 未结 2 1212
北荒
北荒 2020-12-29 03:49

What is the proper/accepted way to print and convert a numpy.float64 to a string? I\'ve noticed just using print or str() will lose some precision

2条回答
  •  一生所求
    2020-12-29 04:19

    Look into numpy.set_printoptions. Specifically,

    numpy.set_printoptions(precision=15)
    

提交回复
热议问题