Skip to content

Commit ec7d2f2

Browse files
committed
get more complicated class using numpy arrays working
1 parent 73634e5 commit ec7d2f2

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

pyWrapper/test_example.py

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -119,14 +119,13 @@ def printVar(varName,var):
119119
# Test 10 - passing an array to a class and retrieving it
120120
# ================================
121121

122-
# scale = 10;
123-
# user = example.ArrayUser_dbl(scale)
124-
# a = np.array((0,1,2,3),'d')
125-
# ans = scale * a
126-
127-
# user.setArray(a)
128-
# output = user.getArray()
129-
# assertEqual(ans, output)
122+
scale = 10;
123+
user = example.ArrayUser_dbl(scale)
124+
a = np.array((0,1,2,3),'d')
125+
ans = scale * a
130126

127+
user.setArray(a)
128+
output = user.getArray(a.size)
129+
assertEqual(ans, output)
131130

132131

0 commit comments

Comments
 (0)