A RetroSearch Logo

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

Search Query:

Showing content from https://docs.scipy.org/doc/numpy/reference/generated/numpy.array_repr.html below:

numpy.array_repr — NumPy v2.3 Manual

numpy.array_repr#
numpy.array_repr(arr, max_line_width=None, precision=None, suppress_small=None)[source]#

Return the string representation of an array.

Parameters:
arrndarray

Input array.

max_line_widthint, optional

Inserts newlines if text is longer than max_line_width. Defaults to numpy.get_printoptions()['linewidth'].

precisionint, optional

Floating point precision. Defaults to numpy.get_printoptions()['precision'].

suppress_smallbool, optional

Represent numbers “very close” to zero as zero; default is False. Very close is defined by precision: if the precision is 8, e.g., numbers smaller (in absolute value) than 5e-9 are represented as zero. Defaults to numpy.get_printoptions()['suppress'].

Returns:
stringstr

The string representation of an array.

Examples

>>> import numpy as np
>>> np.array_repr(np.array([1,2]))
'array([1, 2])'
>>> np.array_repr(np.ma.array([0.]))
'MaskedArray([0.])'
>>> np.array_repr(np.array([], np.int32))
'array([], dtype=int32)'
>>> x = np.array([1e-6, 4e-7, 2, 3])
>>> np.array_repr(x, precision=6, suppress_small=True)
'array([0.000001,  0.      ,  2.      ,  3.      ])'

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.4