Skip to content

Commit

Permalink
style: pre-commit fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
pre-commit-ci[bot] committed Apr 23, 2024
1 parent d407c1f commit 33974f1
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions tests/evt/test_xtalk.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,14 +105,13 @@ def test_manipulate_xtalk_matrix():

def test_numpy_to_dict():

array=np.array([[1,0],[0,1]])
rawids=np.array([1,2])
matrix_dict =xtalk.numpy_to_dict(array,rawids)
assert(matrix_dict=={"ch1":{"ch1":1,"ch2":0},"ch2":{"ch1":0,"ch2":1}})
array = np.array([[1, 0], [0, 1]])
rawids = np.array([1, 2])
matrix_dict = xtalk.numpy_to_dict(array, rawids)
assert matrix_dict == {"ch1": {"ch1": 1, "ch2": 0}, "ch2": {"ch1": 0, "ch2": 1}}

with pytest.raises(ValueError):
xtalk.numpy_to_dict(array,np.array([1,2,3]))
xtalk.numpy_to_dict(array, np.array([1, 2, 3]))

with pytest.raises(ValueError):
xtalk.numpy_to_dict(array,np.array([[1,2,3],[4,5,6]]))

xtalk.numpy_to_dict(array, np.array([[1, 2, 3], [4, 5, 6]]))

0 comments on commit 33974f1

Please sign in to comment.