A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://numpy.org/doc/stable/reference/generated/numpy.printoptions.html below:

numpy.printoptions — NumPy v2.2 Manual

numpy.printoptions#
numpy.printoptions(*args, **kwargs)[source]#

Context manager for setting print options.

Set print options for the scope of the with block, and restore the old options at the end. See set_printoptions for the full description of available options.

Examples

>>> from numpy.testing import assert_equal
>>> with np.printoptions(precision=2):
...     np.array([2.0]) / 3
array([0.67])

The as-clause of the with-statement gives the current print options:

>>> with np.printoptions(precision=2) as opts:
...      assert_equal(opts, np.get_printoptions())

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.3