summaryrefslogtreecommitdiff
path: root/numpy/lib/npyio.py
diff options
context:
space:
mode:
authorkritisingh1 <kritisingh1.ks@gmail.com>2019-04-03 22:55:50 +0530
committerkritisingh1 <kritisingh1.ks@gmail.com>2019-04-05 19:32:18 +0530
commit4c35a853c2a09de5bdb236aa6bd97aa5ea18f195 (patch)
treef2a30746bf8d4da88791f4328146bccdee34bd95 /numpy/lib/npyio.py
parent91a93ad54d6f5d8476f2af046b2895ef81e48c15 (diff)
downloadnumpy-4c35a853c2a09de5bdb236aa6bd97aa5ea18f195.tar.gz
Issue deprecation warnings
Diffstat (limited to 'numpy/lib/npyio.py')
-rw-r--r--numpy/lib/npyio.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/numpy/lib/npyio.py b/numpy/lib/npyio.py
index d702859fa..460c2f5f2 100644
--- a/numpy/lib/npyio.py
+++ b/numpy/lib/npyio.py
@@ -2225,6 +2225,9 @@ def ndfromtxt(fname, **kwargs):
"""
Load ASCII data stored in a file and return it as a single array.
+ .. deprecated:: 1.17
+ np.ndfromtxt is deprecated
+
Parameters
----------
fname, kwargs : For a description of input parameters, see `genfromtxt`.
@@ -2235,6 +2238,10 @@ def ndfromtxt(fname, **kwargs):
"""
kwargs['usemask'] = False
+ # Numpy 1.17
+ warnings.warn(
+ "np.ndfromtxt is deprecated",
+ DeprecationWarning, stacklevel=2)
return genfromtxt(fname, **kwargs)
@@ -2242,6 +2249,9 @@ def mafromtxt(fname, **kwargs):
"""
Load ASCII data stored in a text file and return a masked array.
+ .. deprecated:: 1.17
+ np.mafromtxt is deprecated
+
Parameters
----------
fname, kwargs : For a description of input parameters, see `genfromtxt`.
@@ -2252,6 +2262,10 @@ def mafromtxt(fname, **kwargs):
"""
kwargs['usemask'] = True
+ # Numpy 1.17
+ warnings.warn(
+ "np.mafromtxt is deprecated",
+ DeprecationWarning, stacklevel=2)
return genfromtxt(fname, **kwargs)