Skip to content

Commit

Permalink
Remove workaround introduced in #822.
Browse files Browse the repository at this point in the history
  • Loading branch information
hameerabbasi committed Dec 9, 2024
1 parent 71d2199 commit ad710a3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
2 changes: 1 addition & 1 deletion pixi.toml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ matrepr = "*"
precompile = "python -c 'import finch'"

[feature.finch.pypi-dependencies]
scipy = ">=0.19"
scipy = ">=1.13"
finch-tensor = ">=0.2.1"

[feature.finch.activation.env]
Expand Down
7 changes: 1 addition & 6 deletions sparse/mlir_backend/_conversions.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,6 @@ def _from_scipy(arr: ScipySparseArray, copy: bool | None = None) -> Array:

return from_constituent_arrays(format=csx_format, arrays=(indptr, indices, data), shape=arr.shape)
case "coo":
from ._common import _hold_ref

row, col = arr.row, arr.col
if row.dtype != col.dtype:
raise RuntimeError(f"`row` and `col` dtypes must be the same: {row.dtype} != {col.dtype}.")
Expand All @@ -101,10 +99,7 @@ def _from_scipy(arr: ScipySparseArray, copy: bool | None = None) -> Array:
.build()
)

ret = from_constituent_arrays(format=coo_format, arrays=(pos, row, col, data), shape=arr.shape)
if not copy:
_hold_ref(ret, arr)
return ret
return from_constituent_arrays(format=coo_format, arrays=(pos, row, col, data), shape=arr.shape)
case _:
raise NotImplementedError(f"No conversion implemented for `scipy.sparse.{type(arr.__name__)}`.")

Expand Down

0 comments on commit ad710a3

Please sign in to comment.