abstracted structures fixed

This commit is contained in:
Mari Wahl 2015-01-06 21:11:21 -05:00
parent 3fdbc2a605
commit 01703751f1
98 changed files with 305 additions and 856 deletions

View file

@ -1,32 +0,0 @@
#!/usr/bin/python
# mari von steinkirch @2013
# steinkirch at gmail
import numpy as np
def testing_numpy():
''' tests many features of numpy '''
ax = np.array([1,2,3])
ay = np.array([3,4,5])
print(ax)
print(ax*2)
print(ax+10)
print(np.sqrt(ax))
print(np.cos(ax))
print(ax-ay)
print(np.where(ax<2, ax, 10))
m = np.matrix([ax, ay, ax])
print(m)
print(m.T)
grid1 = np.zeros(shape=(10,10), dtype=float)
grid2 = np.ones(shape=(10,10), dtype=float)
print(grid1)
print(grid2)
print(grid1[1]+10)
print(grid2[:,2]*2)
if __name__ == '__main__':
testing_numpy()