Skip to content

Commit

Permalink
Address merge conflicts.
Browse files Browse the repository at this point in the history
  • Loading branch information
hameerabbasi committed Jan 16, 2024
1 parent cab44be commit 5f5c993
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion sparse/_coo/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
import numba

import numpy as np
import scipy.sparse
from numpy.lib.mixins import NDArrayOperatorsMixin

from .._sparse_array import SparseArray
Expand Down Expand Up @@ -1177,6 +1176,8 @@ def to_scipy_sparse(self):
COO.tocsr : Convert to a :obj:`scipy.sparse.csr_matrix`.
COO.tocsc : Convert to a :obj:`scipy.sparse.csc_matrix`.
"""
import scipy.sparse

check_zero_fill_value(self)

if self.ndim != 2:
Expand All @@ -1187,6 +1188,8 @@ def to_scipy_sparse(self):
return result

def _tocsr(self):
import scipy.sparse

if self.ndim != 2:
raise ValueError("This array must be two-dimensional for this conversion to work.")
row, col = self.coords
Expand Down

0 comments on commit 5f5c993

Please sign in to comment.