Last active
January 22, 2016 14:59
-
-
Save mikaem/7ade09597b9a77d68bbe to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from numpy import * | |
a = zeros((2,3,4,5)) | |
b = rollaxis(a, 3) | |
a[:] = 1 | |
print b.shape, b[0,0,0,0] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Running code leads to:
[1] run test_rollaxis
(5, 2, 3, 4) 1.0
In other words b is a view of the a array