diff --git a/docs/lang/articles/math/linear_solver.md b/docs/lang/articles/math/linear_solver.md index 3b585def9bc05..cd852e4d48a93 100644 --- a/docs/lang/articles/math/linear_solver.md +++ b/docs/lang/articles/math/linear_solver.md @@ -31,7 +31,7 @@ K = ti.linalg.SparseMatrixBuilder(n, n, max_num_triplets=100) b = ti.ndarray(ti.f32, shape=n) @ti.kernel -def fill(A: ti.types.sparse_matrix_builder(), b: ti.template(), interval: ti.i32): +def fill(A: ti.types.sparse_matrix_builder(), b: ti.types.ndarray(), interval: ti.i32): for i in range(n): A[i, i] += 2.0 diff --git a/docs/lang/articles/math/sparse_matrix.md b/docs/lang/articles/math/sparse_matrix.md index c26398eb4f375..780ae4c08d390 100644 --- a/docs/lang/articles/math/sparse_matrix.md +++ b/docs/lang/articles/math/sparse_matrix.md @@ -56,7 +56,7 @@ print(A) The basic operations like `+`, `-`, `*`, `@` and transpose of sparse matrices are supported now. -```python +```python cont print(">>>> Summation: C = A + A") C = A + A print(C)