有没有办法保存 numpy 设置打印选项?
我喜欢避免使用科学记数法,因此我经常使用此命令np.set_printoptions(suppress=True, formatter={'float_kind':'{:0.4f}'.format}, linewidth=130)
(对于其他使用 pandas 数据框抑制科学记数法的问题,此行抑制两个包的科学记数法)。
有没有办法将其保存为默认打印选项?或者是否有一个我可以将其写入的文件,以便它可以使用 python、numpy 或 anaconda 加载?
I like to avoid scientific notation and so I regularly use this command np.set_printoptions(suppress=True, formatter={'float_kind':'{:0.4f}'.format}, linewidth=130)
(For others having the issue suppressing scientific notation with pandas dataframes, this line suppresses scientific notation for both packages).
Is there a way to save this as the default printing options? Or is there a file I can write this to so it loads with python, numpy or anaconda?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论