@@ -2244,6 +2244,12 @@ def ndfromtxt(fname, **kwargs):
2244
2244
"""
2245
2245
Load ASCII data stored in a file and return it as a single array.
2246
2246
2247
+ .. deprecated:: 1.17
2248
+ ndfromtxt` is a deprecated alias of `genfromtxt` which
2249
+ overwrites the ``usemask`` argument with `False` even when
2250
+ explicitly called as ``ndfromtxt(..., usemask=True)``.
2251
+ Use `genfromtxt` instead.
2252
+
2247
2253
Parameters
2248
2254
----------
2249
2255
fname, kwargs : For a description of input parameters, see `genfromtxt`.
@@ -2254,13 +2260,24 @@ def ndfromtxt(fname, **kwargs):
2254
2260
2255
2261
"""
2256
2262
kwargs ['usemask' ] = False
2263
+ # Numpy 1.17
2264
+ warnings .warn (
2265
+ "np.ndfromtxt is a deprecated alias of np.genfromtxt, "
2266
+ "prefer the latter." ,
2267
+ DeprecationWarning , stacklevel = 2 )
2257
2268
return genfromtxt (fname , ** kwargs )
2258
2269
2259
2270
2260
2271
def mafromtxt (fname , ** kwargs ):
2261
2272
"""
2262
2273
Load ASCII data stored in a text file and return a masked array.
2263
2274
2275
+ .. deprecated:: 1.17
2276
+ np.mafromtxt is a deprecated alias of `genfromtxt` which
2277
+ overwrites the ``usemask`` argument with `True` even when
2278
+ explicitly called as ``mafromtxt(..., usemask=False)``.
2279
+ Use `genfromtxt` instead.
2280
+
2264
2281
Parameters
2265
2282
----------
2266
2283
fname, kwargs : For a description of input parameters, see `genfromtxt`.
@@ -2271,6 +2288,11 @@ def mafromtxt(fname, **kwargs):
2271
2288
2272
2289
"""
2273
2290
kwargs ['usemask' ] = True
2291
+ # Numpy 1.17
2292
+ warnings .warn (
2293
+ "np.mafromtxt is a deprecated alias of np.genfromtxt, "
2294
+ "prefer the latter." ,
2295
+ DeprecationWarning , stacklevel = 2 )
2274
2296
return genfromtxt (fname , ** kwargs )
2275
2297
2276
2298
0 commit comments