@@ -98,8 +98,8 @@ def from_coo(cls, A, dense_index: bool = False) -> Series:
9898 ... ([3.0, 1.0, 2.0], ([1, 0, 0], [0, 2, 3])), shape=(3, 4)
9999 ... )
100100 >>> A
101- <3x4 sparse matrix of type '<class 'numpy. float64'> '
102- with 3 stored elements in COOrdinate format >
101+ <COOrdinate sparse matrix of dtype ' float64'
102+ with 3 stored elements and shape (3, 4) >
103103
104104 >>> A.todense()
105105 matrix([[0., 0., 1., 2.],
@@ -186,8 +186,8 @@ def to_coo(
186186 ... row_levels=["A", "B"], column_levels=["C", "D"], sort_labels=True
187187 ... )
188188 >>> A
189- <3x4 sparse matrix of type '<class 'numpy. float64'> '
190- with 3 stored elements in COOrdinate format >
189+ <COOrdinate sparse matrix of dtype ' float64'
190+ with 3 stored elements and shape (3, 4) >
191191 >>> A.todense()
192192 matrix([[0., 0., 1., 3.],
193193 [3., 0., 0., 0.],
@@ -380,8 +380,8 @@ def to_coo(self) -> spmatrix:
380380 --------
381381 >>> df = pd.DataFrame({"A": pd.arrays.SparseArray([0, 1, 0, 1])})
382382 >>> df.sparse.to_coo()
383- <4x1 sparse matrix of type '<class 'numpy. int64'> '
384- with 2 stored elements in COOrdinate format >
383+ <COOrdinate sparse matrix of dtype ' int64'
384+ with 2 stored elements and shape (4, 1) >
385385 """
386386 import_optional_dependency ("scipy" )
387387 from scipy .sparse import coo_matrix
0 commit comments