Skip to content

ENH: Initilize Print Options from Environment Variables #22188

@daskol

Description

@daskol

Proposed new feature or change:

At the moment, print options are initialized with default options and can be changed with either numpy.set_printoptions function or numpy.printoptions context manager. Sometimes it is not very convenient to modify a code with mentioned above function to display arrays in more readable way.

It would be great to initialize print options from environment variables prefixed with NUMPY_PRINTOPTION_ (e.g. precision print option should be initialized from NUMPY_PRINTOPTION_PRECISION envvar).

NUMPY_PRINTOPTION_LINEWIDTH=120 python my-fance-solver.py

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