diff options
author | Antony Lee <anntzer.lee@gmail.com> | 2016-03-19 18:50:55 -0700 |
---|---|---|
committer | Antony Lee <anntzer.lee@gmail.com> | 2016-04-02 12:19:09 -0700 |
commit | 612caca61f82e3e20117ec5917d71fd0f48c42ea (patch) | |
tree | 216258cdc9d3a91d2947165a858340d93689856b /doc | |
parent | 2af06c804931aae4b30bb3349bc60271b0b65381 (diff) | |
download | numpy-612caca61f82e3e20117ec5917d71fd0f48c42ea.tar.gz |
ENH: Allow rolling multiple axes at the same time.
A quick test suggests that this implementation from @seberg, relying on
slices rather than index arrays, is 1.5~3x faster than the previous (1D)
roll (depending on the axis).
Also switched the error message for invalid inputs to match the one of
ufuncs, because the axis can actually also be negative.
Diffstat (limited to 'doc')
-rw-r--r-- | doc/release/1.12.0-notes.rst | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/doc/release/1.12.0-notes.rst b/doc/release/1.12.0-notes.rst index 058bdaac7..486759494 100644 --- a/doc/release/1.12.0-notes.rst +++ b/doc/release/1.12.0-notes.rst @@ -159,6 +159,10 @@ Generalized Ufuncs will now unlock the GIL Generalized Ufuncs, including most of the linalg module, will now unlock the Python global interpreter lock. +np.roll can now roll multiple axes at the same time +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +The ``shift`` and ``axis`` arguments to ``roll`` are now broadcast against each +other, and each specified axis is shifted accordingly. The *__complex__* method has been implemented on the ndarray object ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |