summaryrefslogtreecommitdiff
path: root/numpy/lib/npyio.py
Commit message (Collapse)AuthorAgeFilesLines
...
| * | | BUG: load fails when using pickle without allow_pickle=TruePaul Ivanov2019-04-161-5/+12
| | | | | | | | | | | | | | | | | | | | | | | | a partial mitigation of #12759. see also https://nvd.nist.gov/vuln/detail/CVE-2019-6446
| * | | BUG: Close files if an error occurs in genfromtxtEric Wieser2019-04-121-269/+270
| |/ / | | | | | | | | | | | | | | | Mostly indentation changes Fixes gh-13200
| * | BUG: Fix crash when calling savetxt on a padded arrayEric Wieser2019-04-111-1/+1
| |/ | | | | | | | | | | As a general rule, _every_ use of `.descr` is broken. Fixes #13297
| * DEV: cleanup imports and some assignments (from LGTM)mattip2019-03-171-4/+1
| |
| * MAINT: Move pickle import to numpy.compatCharles Harris2019-02-211-2/+1
| | | | | | | | | | | | | | 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.
| * DOC: Add warning about arbitrary code execution to numpy.loadAndras Deak2019-02-021-0/+6
| | | | | | | | | | | | Load uses pickle under the hood for object arrays, this is made more visible in the documentation using a warning. See also gh-12759
| * Clarify skiprows in loadtxtIlja2018-12-181-1/+1
| |
| * MAINT: address several reviewer commentsTyler Reddy2018-12-141-2/+2
| |
| * TST, DOC: enable refguide_checkTyler Reddy2018-12-141-27/+27
| | | | | | | | | | | | | | | | * 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
* | BUG: Don't construct masked arrays with the wrong mask type in genfromtxtEric Wieser2019-08-191-1/+1
| | | | | | | | This only affects arrays with `dtype([])`, but also follows the recommended way to check for structured arrays in our docs
* | BUG: Don't allow extra fields to be added in genfromtxtEric Wieser2019-08-191-1/+1
|/ | | | Previously passing `dtype=[], names=['a']` would append an extra field, even though `dtype=['a'], names=['b', 'c']` does not.
* Use set litteralsRoman Yurchak2018-11-241-2/+2
|
* MNT: Reword error message about loading pickled data.Elliott Sales de Andrade2018-11-191-2/+2
| | | | This double negative is confusing to me.
* ENH: set correct __module__ for objects in numpy's public APIStephan Hoyer2018-11-131-1/+13
| | | | | | | | | | | | | 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 :).
* Merge pull request #12157 from eric-wieser/fspathMatti Picus2018-10-311-28/+19
|\ | | | | ENH: Add support for third-party path-like objects by backporting os.fspath
| * ENH: Add support for third-party path-like objects by backporting os.fspathEric Wieser2018-10-121-28/+19
| |
* | ENH: __array_function__ support for np.lib, part 2/2 (#12119)Stephan Hoyer2018-10-221-0/+29
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * ENH: __array_function__ support for np.lib, part 2 xref GH12028 np.lib.npyio through np.lib.ufunclike * Fix failures in numpy/core/tests/test_overrides.py * CLN: handle depreaction in dispatchers for np.lib.ufunclike * CLN: fewer dispatchers in lib.twodim_base * CLN: fewer dispatchers in lib.shape_base * CLN: more dispatcher consolidation * BUG: fix test failure * Use all method instead of function in assert_equal * DOC: indicate n is array_like in scimath.logn * MAINT: updates per review * MAINT: more conservative changes in assert_array_equal * MAINT: add back in comment * MAINT: casting tweaks in assert_array_equal * MAINT: fixes and tests for assert_array_equal on subclasses
* MAINT, TST import pickle from numpy.core.numericPierre Glaser2018-10-101-2/+1
| | | | | | | | 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
* MAINT: remove unused stdlib importsEmil Hessman2018-09-301-1/+0
|
* Merge pull request #11962 from mfkasim91/limitrowloadtxtCharles Harris2018-09-301-2/+9
|\ | | | | ENH: maximum lines of content to be read from numpy.loadtxt
| * MAINT: Omit None in max_rows for np.loadtxt docstringmfkasim912018-09-301-1/+1
| |
| * MAINT: No tick for None in `max_rows` docstring for `np.loadtxt`mfkasim912018-09-301-1/+1
| |
| * ENH: add max_rows kwarg to numpy.loadtxt like numpy.genfromtxtmfkasim912018-09-301-2/+9
| |
* | BUG: Don't leave files open and dangling if np.load has a bad encoding ↵Eric Wieser2018-09-231-13/+14
| | | | | | | | argument, or the file is an invalid zip
* | MAINT: refactor design of recursive closures (#11910)Matti Picus2018-09-161-9/+7
|/
* BUG: fix np.load() of empty .npz fileJohn Zwinck2018-07-071-1/+2
| | | | Fixes #9989
* HTTP -> HTTPS, and other linkrot fixesMike Toews2018-06-161-3/+3
|
* Merge branch 'master' into npzfile-mappinEric Wieser2018-05-291-17/+13
|\
| * DOC: add numpy.lib.format to docs and link to itmattip2018-05-141-3/+3
| |
| * DOC: create label and ref, fixes broken linkmattip2018-05-131-3/+3
| |
| * DOC: link to updated module docstring, not NEPmattip2018-05-131-9/+5
| |
| * DOC: Add explanation for comments=None in loadtxt.Hong Xu2018-05-061-2/+2
| |
| * DOC: Make doc examples using StringIO python2-3 compatibleAndras Deak2018-04-271-5/+5
| |
| * MAINT, DOC: Fix typos (#10958)Nicholas Nadeau, P.Eng., AVS2018-04-231-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | * fixed doc typo * fixed lib typos * fixed lapack_lite typos * Revert "fixed lapack_lite typos" This reverts commit e7dada860cb73af190234402508ab79965ecd079.
* | Merge branch 'master' into npzfile-mappinEric Wieser2018-04-221-15/+23
|\ \ | |/
| * DOC: clear up warnings, fix matplotlib plotmattip2018-04-171-7/+8
| |
| * BUG: fix crash in numpy.genfromtxt(..., names=True, comments=None) (#10822)Raunak Shah2018-04-161-3/+4
| | | | | | | | Fixes gh-10780
| * BUG: fix savetxt, loadtxt for '+-' in complexmattip2018-04-101-2/+3
| |
| * Fix low-hanging Pypy compatibility issues (#10737)Pauli Virtanen2018-03-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | * TST: skip refcount-requiring tests if sys.refcount is missing * ENH: io: add refcheck=False to a safe .resize() call The array is allocated immediately above, and the resize always succeeds so it is not necessary to check it. Fixes Pypy compatibility. * TST: remove unused code * TST: factor skipif(not HAS_REFCOUNT) into a separate decorator
| * Merge pull request #10501 from msornay/fromregex-bytesEric Wieser2018-02-201-2/+2
| |\ | | | | | | BUG: fromregex: asbytes called on regexp objects
| | * BUG: fromregex: asbytes called on regexp objectsMathieu Sornay2018-02-051-2/+2
| | | | | | | | | | | | | | | | | | When calling fromregex() with a binary stream and a regular expression object, asbytes() was called on the regexp object, resulting in an incorrect regular expression being compiled and used.
| * | BUG: break cyclic refs in recursive closuresAllan Haldane2018-02-181-0/+5
| | | | | | | | | | | | Fixes #10620
* | | ENH: Make NpzFile conform to the Mapping protocolEric Wieser2018-02-201-27/+32
|/ / | | | | | | | | | | | | | | | | This is potentially a breaking change for python 3, because the Mapping protocol changed between python 2 and python 3 - `items()` and `keys()` now return views, not lists. In practice, any user running `2to3` should have found this fixed itself automatically. Also fixes dir(np.lib.npyio.BagObj(dict(a=1))) on python 3. Fixes gh-1723
* | Merge pull request #10401 from eric-wieser/fix-10394Charles Harris2018-02-061-17/+20
|\ \ | | | | | | BUG: Resize bytes_ columns in genfromtxt
| * | BUG: Resize bytes_ columns in genfromtxtEric Wieser2018-01-151-17/+20
| | | | | | | | | | | | Fixes gh-10394, due to regression in gh-10054
* | | DOC: See #10098 and minor punctuation cleanup (#10478)Derrick Williams2018-01-281-8/+9
| |/ |/| | | | | | | | | * DOC: See #10098 and minor punctuation cleanup * DOC: Correcting per PR comments
* | DOC: Prepare to host NEPs on GH pagesJarrod Millman2017-12-141-3/+3
| |
* | DOC: fix minor typosUnknown2017-12-121-2/+2
| |
* | DEP: Deprecate the pickle aliasesEric Wieser2017-12-101-1/+8
|/ | | | | | * The np.ma functions are misleading, as they do not actually do anything special for ma.array * The np.loads functions doesn't even have numpy-specific documentation, and does not behave consistently with `np.load` * The string overloads of np.ma.load and np.ma.dump do not work well on python 3, as they make assumptions about whether a binary or text pickle file is used (gh-5491)
* MAINT: Refactor some code in npyio.py.Charles Harris2017-11-211-39/+39
|