提交 092ad947 authored 作者: Iban Harlouchet's avatar Iban Harlouchet 提交者: Arnaud Bergeron

testcode for doc/extending/other_ops.txt

上级 cee71c3b
...@@ -90,7 +90,7 @@ and (like in SciPy) they do not support broadcasting operations by default ...@@ -90,7 +90,7 @@ and (like in SciPy) they do not support broadcasting operations by default
formats for sparse type: ``csr`` and ``csc``. So in ``make_mode()``, formats for sparse type: ``csr`` and ``csc``. So in ``make_mode()``,
you can create output variables like this: you can create output variables like this:
.. code-block:: python .. testcode::
out_format = inputs[0].format # or 'csr' or 'csc' if the output format is fixed out_format = inputs[0].format # or 'csr' or 'csc' if the output format is fixed
SparseType(dtype=inputs[0].dtype, format=out_format).make_variable() SparseType(dtype=inputs[0].dtype, format=out_format).make_variable()
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论