Skip to content

Commit 2d101c2

Browse files
committed
Update usage page
1 parent f7a8ec1 commit 2d101c2

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

docs/usage/index.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ where `J.f` and `K.s` represents the data format of the corresponding cones $$\m
4848

4949
As seen above, the problem data is read into Python variables `A`, `b`, `c`, `K` and `J`.
5050

51-
`A`, `b` and `c` may be defined as `numpy.matrix` or `scipy.matrix` objects.
51+
`A`, `b` and `c` may be defined as `numpy.ndarray` or one of the sparse array formats (e.g. `csr_array` or `csc_array`) in `scipy.sparse`.
5252

5353
`K` and `J` are `SymCone` objects, a data structure provided in `sdpa-python`. They can be initialized using `K = sdpap.SymCone()` and `J = sdpap.SymCone()` respectively. We need to set their parameters according to the problem.
5454

@@ -141,21 +141,21 @@ Now, we can define and solve the sample CLP given in the beginning of this secti
141141

142142
```python
143143
import sdpap
144-
from scipy import matrix
144+
import numpy as np
145145

146-
A = matrix([
146+
A = np.array([
147147
[10, 4, 4, 0],
148148
[0, 0, 0, -8],
149149
[0, -8, -8, -2]
150150
])
151151

152-
b = matrix([
152+
b = np.array([
153153
[48],
154154
[-8],
155155
[20]
156156
])
157157

158-
c = matrix([
158+
c = np.array([
159159
[-11],
160160
[0],
161161
[0],

0 commit comments

Comments
 (0)