Skip to content

Instantly share code, notes, and snippets.

@yptheangel
Created May 31, 2020 13:39
Show Gist options
  • Save yptheangel/10fa196429d5406c68a5f71fa64b4c0d to your computer and use it in GitHub Desktop.
Save yptheangel/10fa196429d5406c68a5f71fa64b4c0d to your computer and use it in GitHub Desktop.
push pop for numpy
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