File tree Expand file tree Collapse file tree 1 file changed +3
-7
lines changed
Expand file tree Collapse file tree 1 file changed +3
-7
lines changed Original file line number Diff line number Diff line change @@ -183,11 +183,7 @@ def transform_to_bcoo(input_matrix):
183183 ValueError
184184 The input matrix format is not supported.
185185 """
186- if isinstance (input_matrix , (jnp .ndarray , np .ndarray )):
187- bcoo_matrix = BCOO .fromdense (
188- input_matrix , nse = input_matrix .shape [0 ] * input_matrix .shape [1 ]
189- )
190- elif isinstance (input_matrix , BCSR ):
186+ if isinstance (input_matrix , BCSR ):
191187 bcoo_matrix = input_matrix .to_bcoo ()
192188 elif isinstance (input_matrix , (sparray , spmatrix )):
193189 bcoo_matrix = BCOO .from_scipy_sparse (input_matrix )
@@ -196,8 +192,8 @@ def transform_to_bcoo(input_matrix):
196192 else :
197193 raise ValueError (
198194 "Unsupported matrix format. "
199- "The constraint matrix must be one of the following types: "
200- "jnp.ndarray, numpy.ndarray , BCOO, or BCSR."
195+ "The sparse constraint matrix must be one of the following types: "
196+ "scipy.sparse.sparray, scipy.sparse.spmatrix , BCOO, or BCSR."
201197 )
202198 return bcoo_matrix
203199
You can’t perform that action at this time.
0 commit comments