Skip to content

Commit

Permalink
Backport PR #40020: CI/TST: Supply dtype to coo_matrix until scipy is…
Browse files Browse the repository at this point in the history
… fixed (#40034)

Co-authored-by: Richard Shadrach <[email protected]>
  • Loading branch information
meeseeksmachine and rhshadrach authored Feb 25, 2021
1 parent e0321f1 commit b14ffd8
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pandas/tests/arrays/sparse/test_array.py
Original file line number Diff line number Diff line change
Expand Up @@ -1174,7 +1174,9 @@ def test_from_coo(self):
row = [0, 3, 1, 0]
col = [0, 3, 1, 2]
data = [4, 5, 7, 9]
sp_array = scipy.sparse.coo_matrix((data, (row, col)))
# TODO: Remove dtype when scipy is fixed
# https://github.com/scipy/scipy/issues/13585
sp_array = scipy.sparse.coo_matrix((data, (row, col)), dtype="int")
result = pd.Series.sparse.from_coo(sp_array)

index = pd.MultiIndex.from_arrays([[0, 0, 1, 3], [0, 2, 1, 3]])
Expand Down

0 comments on commit b14ffd8

Please sign in to comment.