Skip to content

Commit 6402dcc

Browse files
committed
fix repr changes for scipy 1.14
1 parent 8c8664f commit 6402dcc

File tree

6 files changed

+18
-18
lines changed

6 files changed

+18
-18
lines changed

advanced/scipy_sparse/coo_array.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,8 @@ Examples
4949
>>> data = np.array([4, 5, 7, 9])
5050
>>> mtx = sp.sparse.coo_array((data, (row, col)), shape=(4, 4))
5151
>>> mtx
52-
<4x4 sparse array of type '<... 'numpy.int64'>'
53-
with 4 stored elements in COOrdinate format>
52+
<COOrdinate sparse array of dtype 'int64'
53+
with 4 stored elements and shape (4, 4)>
5454
>>> mtx.toarray()
5555
array([[4, 0, 9, 0],
5656
[0, 7, 0, 0],

advanced/scipy_sparse/csc_array.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,8 @@ Examples
5050
>>> data = np.array([1, 2, 3, 4, 5, 6])
5151
>>> mtx = sp.sparse.csc_array((data, (row, col)), shape=(3, 3))
5252
>>> mtx
53-
<3x3 sparse array of type '<... 'numpy.int64'>'
54-
with 6 stored elements in Compressed Sparse Column format>
53+
<Compressed Sparse Column sparse array of dtype 'int64'
54+
with 6 stored elements and shape (3, 3)>
5555
>>> mtx.toarray()
5656
array([[1, 0, 2],
5757
[0, 0, 3],

advanced/scipy_sparse/csr_array.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,8 @@ Examples
4949
>>> data = np.array([1, 2, 3, 4, 5, 6])
5050
>>> mtx = sp.sparse.csr_array((data, (row, col)), shape=(3, 3))
5151
>>> mtx
52-
<3x3 sparse array of type '<... 'numpy.int64'>'
53-
with 6 stored elements in Compressed Sparse Row format>
52+
<Compressed Sparse Row sparse array of dtype 'int64'
53+
with 6 stored elements and shape (3, 3)>
5454
>>> mtx.toarray()
5555
array([[1, 0, 2],
5656
[0, 0, 3],

advanced/scipy_sparse/dia_array.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,8 @@ Examples
4242
>>> offsets = np.array([0, -1, 2])
4343
>>> mtx = sp.sparse.dia_array((data, offsets), shape=(4, 4))
4444
>>> mtx
45-
<4x4 sparse array of type '<... 'numpy.int64'>'
46-
with 9 stored elements (3 diagonals) in DIAgonal format>
45+
<DIAgonal sparse array of dtype 'int64'
46+
with 9 stored elements and shape (4, 4)>
4747
>>> mtx.toarray()
4848
array([[1, 0, 3, 0],
4949
[1, 2, 0, 4],

advanced/scipy_sparse/dok_array.rst

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,14 @@ Examples
2828

2929
>>> mtx = sp.sparse.dok_array((5, 5), dtype=np.float64)
3030
>>> mtx
31-
<5x5 sparse array of type '<... 'numpy.float64'>'
32-
with 0 stored elements in Dictionary Of Keys format>
31+
<Dictionary Of Keys sparse array of dtype 'float64'
32+
with 0 stored elements and shape (5, 5)>
3333
>>> for ir in range(5):
3434
... for ic in range(5):
3535
... mtx[ir, ic] = 1.0 * (ir != ic)
3636
>>> mtx
37-
<5x5 sparse array of type '<... 'numpy.float64'>'
38-
with 20 stored elements in Dictionary Of Keys format>
37+
<Dictionary Of Keys sparse array of dtype 'float64'
38+
with 20 stored elements and shape (5, 5)>
3939
>>> mtx.toarray()
4040
array([[0., 1., 1., 1., 1.],
4141
[1., 0., 1., 1., 1.],
@@ -48,8 +48,8 @@ Examples
4848
>>> mtx[1, 1]
4949
np.float64(0.0)
5050
>>> mtx[[1], 1:3]
51-
<1x2 sparse array of type '<... 'numpy.float64'>'
52-
with 1 stored elements in Dictionary Of Keys format>
51+
<Dictionary Of Keys sparse array of dtype 'float64'
52+
with 1 stored elements and shape (1, 2)>
5353
>>> mtx[[1], 1:3].toarray()
5454
array([[0., 1.]])
5555
>>> mtx[[2, 1], 1:3].toarray()

advanced/scipy_sparse/lil_array.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@ Examples
3939

4040
>>> mtx[:2, [1, 2, 3]] = data
4141
>>> mtx
42-
<4x5 sparse array of type '<... 'numpy.float64'>'
43-
with 3 stored elements in List of Lists format>
42+
<List of Lists sparse array of dtype 'float64'
43+
with 3 stored elements and shape (4, 5)>
4444
>>> print(mtx)
4545
(0, 1) 1.0
4646
(0, 3) 1.0
@@ -71,8 +71,8 @@ Examples
7171
(2, 0) 1
7272
(2, 3) 1
7373
>>> mtx[:2, :]
74-
<2x4 sparse array of type '<... 'numpy.int64'>'
75-
with 4 stored elements in List of Lists format>
74+
<List of Lists sparse array of dtype 'int64'
75+
with 4 stored elements and shape (2, 4)>
7676
>>> mtx[:2, :].toarray()
7777
array([[0, 1, 2, 0],
7878
[3, 0, 1, 0]]...)

0 commit comments

Comments
 (0)