summaryrefslogtreecommitdiff
path: root/numpy/lib/npyio.py
diff options
context:
space:
mode:
Diffstat (limited to 'numpy/lib/npyio.py')
-rw-r--r--numpy/lib/npyio.py22
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)