Script execution
This commit is contained in:
19
script/test/scisoftpy.py
Normal file
19
script/test/scisoftpy.py
Normal file
@@ -0,0 +1,19 @@
|
||||
import scisoftpy as np
|
||||
|
||||
print "Meshgrid testing"
|
||||
x = np.arange(0, 6, 1)
|
||||
y = np.arange(0, 4, 1)
|
||||
xy = np.meshgrid(x, y)
|
||||
xy = np.meshgrid(x, y, indexing="ij")
|
||||
print xy
|
||||
|
||||
|
||||
a = np.arange(1, 9).reshape(2, 2, 2)
|
||||
b = np.array([-2, -3, 5, 7]).reshape(2, 2)
|
||||
self.checkitems([35, 63], np.tensordot(a, b))
|
||||
self.checkitems([63, 70], np.tensordot(b, a))
|
||||
a = np.arange(60.0).reshape(3, 4, 5)
|
||||
b = np.arange(24.0).reshape(4, 3, 2)
|
||||
print np.tensordot(a, b, axes=([1, 0], [0, 1])
|
||||
|
||||
|
||||
Reference in New Issue
Block a user