Skip to content

Commit

Permalink
Remove csr_matrix and dia_matrix (#816)
Browse files Browse the repository at this point in the history
* ctrl f + replace

* dia_array to dia_matrix

* remove isinstance
  • Loading branch information
purva-thakre authored Oct 2, 2024
1 parent 5dc4c71 commit 2f0ee8e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion toqito/perms/permute_systems.py
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ def permute_systems(
row_perm = permute_systems(vec_arg, perm, dim[0][:], False, inv_perm)

# This condition is only necessary if the `input_mat` variable is sparse.
if isinstance(input_mat, (sparse.csr_matrix, sparse.dia_matrix)):
if sparse.issparse(input_mat):
input_mat = input_mat.toarray()
permuted_mat = input_mat[row_perm, :]
permuted_mat = np.array(permuted_mat)
Expand Down

0 comments on commit 2f0ee8e

Please sign in to comment.