diff options
author | Charles Harris <charlesr.harris@gmail.com> | 2019-06-26 10:43:36 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-06-26 10:43:36 -0700 |
commit | df096f8386cb1478e117fc959c3c3c374fb1895b (patch) | |
tree | 6f716b3d39fc6305ac4b7c0a489bbe693b258c0d /numpy/lib/npyio.py | |
parent | 113560b576c57fcbaa758cb8e7b12b7f19f51c2f (diff) | |
parent | 4262579fe671bad09aefa1716f45c73023011048 (diff) | |
download | numpy-df096f8386cb1478e117fc959c3c3c374fb1895b.tar.gz |
Merge branch 'master' into force-zip64
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 e1808f7bd..318dc434a 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) |