| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
| |
This pull requests speeds up numpy.load. Since _filter_header is quite a bottleneck, we only run it if we must. Users will get a warning if they have a legacy Numpy file so that they can save it again for faster loading.
Main discussion and benchmarks see #22898
Co-authored-by: Sebastian Berg <sebastian@sipsolutions.net>
|
|\
| |
| | |
MAINT: Ensure graceful handling of large header sizes
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This ensures graceful handling of large header files. Unfortunately,
it may be a bit inconvenient for users, thus the new kwarg and the
work-around of also accepting allow-pickle.
See also the documation here:
https://docs.python.org/3.10/library/ast.html#ast.literal_eval
|
|/ |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
| |
* Remove unnecessary imports and minor fixes
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* ENH: Remove call to `_filter_header` from `_write_array_header`
Improve performance of `np.save` by removing the call
when writing the header, as it is known to be done in Python 3.
* ENH: Only call `_filter_header` from `_read_array_header` for old vers
Improve performance of `np.load` for arrays with version >= (3,0)
by removing the call, as it is known to be done in Python 3.
* ENH: Use a set of keys when checking `read_array`
Improve performance of `np.load`.
* DOC: Improve performance of `np.{save,load}` for small arrays
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Added chain exception in _pocketfft.py
* Added chain exception in format.py
* Added chain exception in make_lite.py
* Added chain exception in mrecords.py
* added from e for exceptions
* Minor update for _read_array_header exception msg
* Removed \n from excp msg and e from msg format.
Co-authored-by: Eric Wieser <wieser.eric@gmail.com>
* Update numpy/linalg/lapack_lite/make_lite.py
Co-authored-by: Eric Wieser <wieser.eric@gmail.com>
Co-authored-by: Eric Wieser <wieser.eric@gmail.com>
Co-authored-by: Charles Harris <charlesr.harris@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Added chain exception in _bits_of func
* Added chain exception
* Added chain exception in unixccompiler.py
* Added chain exception in config.py
* Added chain exception in fcompiler __init__.py
* Added chain exception in compaq.py
* Added chain exception in format.py
* Updated raise chain exception
* STY: Break long line.
Co-authored-by: Charles Harris <charlesr.harris@gmail.com>
|
| |
|
|
|
| |
Follow up to [this commit](https://github.com/numpy/numpy/commit/36f71788620bb17d123669cf03f086fb2b87b3a8), which missed the second pronoun in this sentence.
|
|
|
|
| |
DOC: fixed docstring for descr_to_dtype
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Per #16500 discussion, adds link updates to PR.
Replaces NEP URLs with intersphinx links in these
files:
* doc/HOWTO_RELEASE.rst.txt
* doc/source/dev/howto-docs.rst
* numpy/doc/dispatch.py
* numpy/lib/format.py
and incorporates @rossbar's #16502 change of `config.py`.
|
|
|
|
|
| |
types (#15816)
Cleanup from the dropping of python 2
|
|
|
|
|
|
|
| |
The bug occurs since numpy 1.16. Before that empty descr corresponds to
`np.dtype([])`. This fixes the problem by following numpy 1.15's
behavior.
Closes gh-15396
|
| |
|
| |
|
| |
|
|
|
|
|
| |
As numpy is Python 3 only, these import statements are now unnecessary
and don't alter runtime behavior.
|
|
|
| |
Address gh-14142 for the 1.18 release: warn when saving a dtype with metadata that cannot be loaded.
|
| |
|
| |
|
|\ |
|
| |
| |
| |
| | |
All of this code was already correct, this just tidies it a little
|
|/ |
|
|\ |
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| | |
This version encodes the dtype as utf8 instead of latin1.
Unfortunately we need to create a new version to make this change, because we did not limit ourselves to ASCII in versions 1 and 2.
Fixes gh-7391
|
|/
|
|
| |
This works towards adding a third format that supports utf8
|
|
|
|
|
|
| |
a partial mitigation of #12759.
see also https://nvd.nist.gov/vuln/detail/CVE-2019-6446
|
|
|
|
|
|
|
|
|
|
| |
`"Invalid version %r" % (1, 2)` would fail with `TypeError: not all arguments converted during string formatting`
The `Header is not a dictionary` error had a similar problem.
Fixed by changing this entire function to use `.format` in place of `%`, which does not have this gotcha.
Found using LGTM.com
|
|
|
|
|
|
|
| |
The pickle module was being imported from numpy.core.numeric. It was
defined there in order to use pickle5 when available in Python3 and
cpickle in Python2. The numpy.compat module seems a better place for
that.
|
| |
|
| |
|
| |
|
|
|
| |
* ENH: Improve support for pathlib.Path objects in more functions
|
|
|
|
|
|
|
|
| |
All imports of pickle from numpy modules are now done this way:
>>> from numpy.core.numeric import pickle
Also, some loops on protocol numbers are added over pickle tests that
were not caught from #12090
|
| |
|
| |
|
| |
|
| |
|