Skip to content

Python数据分析练习#_24-如何打印完整的numpy数组而不截断 有误 #62

@lxpoet

Description

@lxpoet

np.set_printoptions(threshold=np.nan)
出现报错:threshold must be non-NAN, try sys.maxsize for untruncated representation
可改为:
np.set_printoptions(threshold=np.inf)
或者根据提示
先导入 sys 库
import sys
然后将 原语句改为
np.set_printoptions(threshold=sys.maxsize

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions