Last active
July 24, 2018 10:55
-
-
Save vinaykudari/81870347e4a32db14c6ae2d1da062fe4 to your computer and use it in GitHub Desktop.
Reshape
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
a = np.arange(4) | |
print(a,'\n') | |
>> [0 1 2 3] | |
b = np.reshape(a,(2,2)) | |
print(b, '\n') | |
>> [[0 1] | |
[2 3]] | |
c = b.reshape(4) | |
print(c) | |
>> [0 1 2 3] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment