| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
| |
Previously, for structured arrays that contain a lot of elements,
those are always all shown, independent of the threshold print option.
This PR ensures that threshold and edgeitems are respected.
Note that multidimensional items are typeset without line breaks,
to avoid breaking up the structure. Hence, this does not solve the
issue that structured array elements can easily overfill a line on
the console.
|
|
|
|
|
|
|
| |
Fx problem where, for example,
np.array([1], dtype='>u2') and np.array([1], dtype='<u2')
both got represented as np.array([1], dtype=uint16), or the dtype is not shown for the default ones (float64, default int).
|
| |
|
| |
|
|
|
|
|
| |
The issubclass should always be false in Python3, so this change
should not change behavior.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Before:
```
In [1]: np.dtype({"names": ["a"], "formats": [int], "offsets": [2]})
Out[1]: dtype({'names':['a'], 'formats':['<i8'], 'offsets':[2], 'itemsize':10})
```
After:
```
In [1]: np.dtype({"names": ["a"], "formats": [int], "offsets": [2]})
Out[1]: dtype({'names': ['a'], 'formats': ['<i8'], 'offsets': [2], 'itemsize': 10})
```
* Allow switching back to old dtype printing format.
* Add changelog.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This adds a C-side scaled float (actually double), that is available
as:
SF = np.core._multiarray_umath._get_sfloat_dtype()
It supports different scaling factors:
a = np.arange(10.).astype(SF(2.))
b = np.arange(10.).astype(SF(0.5))
and casting from double (used there).
This commit makes tiny changes in NumPy to support correct printing.
|
|\
| |
| | |
BUG, ENH: fix array2string rounding bug by adding min_digits option
|
| | |
|
| | |
|
| |
| |
| | |
Co-authored-by: Sebastian Berg <sebastian@sipsolutions.net>
|
| |
| |
| | |
Co-authored-by: Sebastian Berg <sebastian@sipsolutions.net>
|
| |
| |
| |
| | |
Fixes #18609
|
|/ |
|
| |
|
|
|
| |
Co-authored-by: Eric Wieser <wieser.eric@gmail.com>
|
|
|
|
|
| |
Fixed a bug where precision couldn't be a non-native integer.
See comments on pull request #18263 for more info.
|
|
|
|
| |
See issue #18254
|
|
|
|
|
|
|
|
|
| |
Via prototype docstring autoreformatter; and cherry-picked to mostly
include spacing issues around colons in parameters and see also.
When no space is present numpydoc tend to miss-parse those sections
A couple of typos are fixed as well.
|
|
|
|
| |
It's been non-functional for the past 8 years (xref https://github.com/numpy/numpy/pull/459)
|
| |
|
|
|
|
|
|
|
| |
This removes the old default routines in 'strfunc.c' that were never
used and looked to have unicode/byte problems. The functions now
self initialize when called, so the explicit initialization when the
arrayprint module is loaded is no longer needed.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
Now that 2.7 is gone, there is no need to pop manually from kwarg dictionaries.
|
|
|
|
|
|
|
| |
Inheriting from object was necessary for Python 2 compatibility to use
new-style classes. In Python 3, this is unnecessary as there are no
old-style classes.
Dropping the object is more idiomatic Python.
|
|
|
|
|
| |
As numpy is Python 3 only, these import statements are now unnecessary
and don't alter runtime behavior.
|
|\
| |
| | |
MAINT: reduce the number of doc build warnings
|
| | |
|
|\ \
| |/
|/| |
MAINT: Avoid BytesWarning in PyArray_DescrConverter()
|
| |
| |
| |
| |
| |
| |
| |
| | |
A BytesWarning can be emitted when bytes are and strings are mismatched.
Catching BytesWarning ensures a better boundary between str and bytes
type. The test suite is now run with the -b flag to emit this warning.
Fixes #9308
|
|/
|
| |
DOC: add `printoptions` as a context manager to `set_printoptions`
|
|
|
|
|
|
| |
We add the reference to 'printoptions' context manager in "See Also"
section in 'set_printoptions' and 'get_printoptions' functions.
These changes improve the documentation and make it easy to search.
|
|\
| |
| | |
BUG: Fix misuse of .names and .fields in various places
|
| |\ |
|
| | |
| | |
| | |
| | | |
No behavior change here
|
| |/
|/| |
|
| |
| |
| |
| | |
Previously an incorrect ``threshold`` raised ``ValueError``; it now raises ``TypeError``
for non-numeric types and ``ValueError`` for ``nan`` values.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Quickstart guide recommends np.set_printoptions(threshold=np.nan) but that fails.
So changed that to np.set_printoptions(threshold=sys.maxsize)
Closes #13900
* DOC:Update the docstring of set_printoptions
Add preferred max value for threshold is sys.maxsize
* Revert "DOC:Update the docstring of set_printoptions"
This reverts commit 9641121fcb84b9ad5edb188a4a5b4ac9361fbf0b.
* DOC:Update the docstring of set_printoptions
Add preferred max value for threshold is sys.maxsize
* DOC:Update the docstring of set_printoptions
Better pharasing in docstring.
* DOC:Update the description of set_printoptions in quickstart doc #13900
Fix indentation
|
| | |
|
| |
| |
| |
| |
| | |
Point users to get_printoptions(), which returns the current
print defaults.
|
| |
| |
| |
| |
| |
| | |
Point documentation on default values for array2string, array_str,
and array_repr to set_printoptions. set_printoptions uses the same
defaulting scheme.
|
|/
|
|
|
|
|
|
| |
* ported the refguide_check module from SciPy for usage
in NumPy docstring execution/ verification; added the
refguide_check run to Azure Mac OS CI
* adjusted NumPy docstrings such that refguide_check passes
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fixes GH-12271
Tests verify that everything in ``dir(numpy)`` either has ``__module__`` set to
``'numpy'``, or appears in an explicit whitelist of undocumented functions and
exported bulitins. These should eventually be documented or removed.
I also identified a handful of functions for which I had accidentally not setup
dispatch for with ``__array_function__`` before, because they were listed under
"ndarray methods" in ``_add_newdocs.py``. I guess that should be a lesson in
trusting code comments :).
|
| |
|