diff options
author | Matti Picus <matti.picus@gmail.com> | 2019-06-10 20:34:10 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-06-10 20:34:10 +0300 |
commit | 64728130381ff0a72a11a4c6fe431b3c71e06095 (patch) | |
tree | eeebe60e3d7fc78df8bec17c8fc83f13fc6ec005 /numpy/lib/npyio.py | |
parent | 0b43174bbf6d9f1ce1aeddaa3dcf046faff8da69 (diff) | |
parent | 13561bd89d67bd101cdb195f003ae1e34c6a5b52 (diff) | |
download | numpy-64728130381ff0a72a11a4c6fe431b3c71e06095.tar.gz |
Merge pull request #13222 from kritisingh1/patch1
DOC: Document/ Deprecate functions exposed in "numpy" namespace
Diffstat (limited to 'numpy/lib/npyio.py')
-rw-r--r-- | numpy/lib/npyio.py | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/numpy/lib/npyio.py b/numpy/lib/npyio.py index 1845305d1..83f11774d 100644 --- a/numpy/lib/npyio.py +++ b/numpy/lib/npyio.py @@ -2244,6 +2244,12 @@ def ndfromtxt(fname, **kwargs): """ Load ASCII data stored in a file and return it as a single array. + .. deprecated:: 1.17 + ndfromtxt` is a deprecated alias of `genfromtxt` which + overwrites the ``usemask`` argument with `False` even when + explicitly called as ``ndfromtxt(..., usemask=True)``. + Use `genfromtxt` instead. + Parameters ---------- fname, kwargs : For a description of input parameters, see `genfromtxt`. @@ -2254,6 +2260,11 @@ def ndfromtxt(fname, **kwargs): """ kwargs['usemask'] = False + # Numpy 1.17 + warnings.warn( + "np.ndfromtxt is a deprecated alias of np.genfromtxt, " + "prefer the latter.", + DeprecationWarning, stacklevel=2) return genfromtxt(fname, **kwargs) @@ -2261,6 +2272,12 @@ def mafromtxt(fname, **kwargs): """ Load ASCII data stored in a text file and return a masked array. + .. deprecated:: 1.17 + np.mafromtxt is a deprecated alias of `genfromtxt` which + overwrites the ``usemask`` argument with `True` even when + explicitly called as ``mafromtxt(..., usemask=False)``. + Use `genfromtxt` instead. + Parameters ---------- fname, kwargs : For a description of input parameters, see `genfromtxt`. @@ -2271,6 +2288,11 @@ def mafromtxt(fname, **kwargs): """ kwargs['usemask'] = True + # Numpy 1.17 + warnings.warn( + "np.mafromtxt is a deprecated alias of np.genfromtxt, " + "prefer the latter.", + DeprecationWarning, stacklevel=2) return genfromtxt(fname, **kwargs) |