-
-
Notifications
You must be signed in to change notification settings - Fork 10.9k
DOC: Document/ Deprecate functions exposed in "numpy" namespace #13222
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2225,6 +2225,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`. | ||
|
@@ -2235,13 +2241,24 @@ 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) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Needs a comment above the warning with the date, version, gh-issue format There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should also recommend a replacement, perhaps |
||
return genfromtxt(fname, **kwargs) | ||
|
||
|
||
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`. | ||
|
@@ -2252,6 +2269,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) | ||
|
||
|
||
|
Uh oh!
There was an error while loading. Please reload this page.