Skip to content

Commit 6feaa06

Browse files
committed
unittest: call from C++ puts arange() inside of block
1 parent e2ab314 commit 6feaa06

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

unittest/python/test_eigen_ref.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,12 +52,13 @@ def __init__(self):
5252
super().__init__()
5353

5454
def call(self, mat):
55-
mat[:, :] = 1.0
55+
n, m = mat.shape
56+
mat[:, :] = np.arange(n * m).reshape(n, m)
5657

5758
modify = ModifyBlockImpl()
5859
modify.modify(2, 3)
5960
Jref = np.zeros((10, 10))
60-
Jref[:2, :3] = 1.0
61+
Jref[:2, :3] = np.arange(6).reshape(2, 3)
6162

6263
assert np.array_equal(Jref, modify.J)
6364

0 commit comments

Comments
 (0)