Created
May 31, 2020 13:39
-
-
Save yptheangel/10fa196429d5406c68a5f71fa64b4c0d to your computer and use it in GitHub Desktop.
push pop for numpy
This file contains 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
import numpy as np | |
a = np.array(["1","2","3"]) | |
print(a) | |
print(type(a)) | |
a=a[1:] | |
print(a) | |
print(len(a)) | |
a=np.append(a,1) | |
print(a) | |
print(len(a)) | |
a=a[1:] | |
print(a) | |
print(len(a)) | |
a=np.append(a,6) | |
print(a) | |
print(len(a)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment