Skip to content

Commit 9ae90c5

Browse files
Manfredssclaude
andcommitted
Fix CI COPY-FROM failures for _assert and inverse docs
Replace COPY-FROM directives with inline code examples since the CI nightly Paddle wheel does not include these new APIs yet. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 0bb5a41 commit 9ae90c5

2 files changed

Lines changed: 19 additions & 2 deletions

File tree

docs/api/paddle/_assert_cn.rst

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,12 @@ _assert
1717
代码示例
1818
::::::::::::
1919

20-
COPY-FROM: paddle._assert
20+
.. code-block:: pycon
21+
22+
>>> import paddle
23+
>>> # Non-tensor condition
24+
>>> paddle._assert(1 == 1, "This should pass")
25+
26+
>>> # Tensor condition
27+
>>> x = paddle.to_tensor([True])
28+
>>> paddle._assert(x, "Tensor assertion")

docs/api/paddle/inverse_cn.rst

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,4 +23,13 @@ Tensor,``x`` 的逆矩阵,维度和数据类型与 ``x`` 相同。
2323
代码示例
2424
::::::::::::
2525

26-
COPY-FROM: paddle.inverse
26+
.. code-block:: pycon
27+
28+
>>> import paddle
29+
30+
>>> mat = paddle.to_tensor([[2, 0], [0, 2]], dtype='float32')
31+
>>> inv = paddle.inverse(mat)
32+
>>> print(inv)
33+
Tensor(shape=[2, 2], dtype=float32, place=Place(cpu), stop_gradient=True,
34+
[[0.50000000, 0. ],
35+
[0. , 0.50000000]])

0 commit comments

Comments
 (0)