Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

DEP: deprecate rollaxis #9475

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

Merged
merged 7 commits into from
Aug 11, 2017
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
DEP don't formally deprecate rollaxis, just add a hint to the documen…
…tation
  • Loading branch information
nschloe committed Jul 27, 2017
commit d735507fd6b103ebf50fb1b0e04fbefe1400d50a
7 changes: 4 additions & 3 deletions 7 numpy/core/numeric.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,6 @@
from .numerictypes import longlong, intc, int_, float_, complex_, bool_
from ._internal import TooHardError, AxisError

from numpy.lib import deprecate

bitwise_not = invert
ufunc = type(sin)
newaxis = None
Expand Down Expand Up @@ -1434,11 +1432,14 @@ def roll(a, shift, axis=None):
return result


@deprecate(message="Use numpy.moveaxis() instead.")
def rollaxis(a, axis, start=0):
"""
Roll the specified axis backwards, until it lies in a given position.

This function continues to be supported for backward compatibility, but you
should prefer np.moveaxis. The np.moveaxis function was added in NumPy
1.11.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

referring to this as `moveaxis` will cause a link to be generated

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it because of the missing tick or the additional np.?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Both, I think. There's nothing special about "np" - remember, the module's called "numpy" (but that's implied anyway in references)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Got it.


Parameters
----------
a : ndarray
Expand Down
Morty Proxy This is a proxified and sanitized view of the page, visit original site.