Skip to content

Commit

Permalink
Add additional test.
Browse files Browse the repository at this point in the history
  • Loading branch information
joerowell committed Aug 16, 2023
1 parent 8b03f1a commit 6e54066
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions tests/test_numpy.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,13 @@ def test_dump_r(nrows=10):

for i in range(nrows):
assert abs(M.get_r(i, i) - r[i]) < 0.001

def test_is_numpy_integer(nrows=10):
if not have_numpy:
return

import numpy as np
B = np.eye(nrows, dtype=np.int32)
Bfpy = IntegerMatrix.from_matrix(B)
for i in range(nrows):
assert Bfpy[i][i] == 1

0 comments on commit 6e54066

Please sign in to comment.