Skip to content

Commit b10f89d

Browse files
authored
Merge pull request #824 from hameerabbasi/remove-workaround
Remove workaround introduced in #822.
2 parents 71d2199 + ad710a3 commit b10f89d

File tree

2 files changed

+2
-7
lines changed

2 files changed

+2
-7
lines changed

pixi.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ matrepr = "*"
4848
precompile = "python -c 'import finch'"
4949

5050
[feature.finch.pypi-dependencies]
51-
scipy = ">=0.19"
51+
scipy = ">=1.13"
5252
finch-tensor = ">=0.2.1"
5353

5454
[feature.finch.activation.env]

sparse/mlir_backend/_conversions.py

+1-6
Original file line numberDiff line numberDiff line change
@@ -78,8 +78,6 @@ def _from_scipy(arr: ScipySparseArray, copy: bool | None = None) -> Array:
7878

7979
return from_constituent_arrays(format=csx_format, arrays=(indptr, indices, data), shape=arr.shape)
8080
case "coo":
81-
from ._common import _hold_ref
82-
8381
row, col = arr.row, arr.col
8482
if row.dtype != col.dtype:
8583
raise RuntimeError(f"`row` and `col` dtypes must be the same: {row.dtype} != {col.dtype}.")
@@ -101,10 +99,7 @@ def _from_scipy(arr: ScipySparseArray, copy: bool | None = None) -> Array:
10199
.build()
102100
)
103101

104-
ret = from_constituent_arrays(format=coo_format, arrays=(pos, row, col, data), shape=arr.shape)
105-
if not copy:
106-
_hold_ref(ret, arr)
107-
return ret
102+
return from_constituent_arrays(format=coo_format, arrays=(pos, row, col, data), shape=arr.shape)
108103
case _:
109104
raise NotImplementedError(f"No conversion implemented for `scipy.sparse.{type(arr.__name__)}`.")
110105

0 commit comments

Comments
 (0)