提交 d36b5659 authored 作者: Frederic's avatar Frederic

Document patternbroadcast

上级 8cf75dc8
...@@ -586,6 +586,14 @@ dimensions, see :meth:`_tensor_py_operators.dimshuffle`. ...@@ -586,6 +586,14 @@ dimensions, see :meth:`_tensor_py_operators.dimshuffle`.
broadcastable. When performing the function, if the length of `x` broadcastable. When performing the function, if the length of `x`
along that dimension is not 1, a ``ValueError`` will be raised. along that dimension is not 1, a ``ValueError`` will be raised.
.. function:: patternbroadcast(x, broadcastable)
Change `x` broadcastable pattern to
`broadcastable`. `broadcastable` must be iterable. For example,
`patternbroadcast(x, (True, False))` will make the first dimension
of `x` broadcastable and the second dimension not broadcastable,
so x will now be a `row`.
.. function:: flatten(x, outdim=1) .. function:: flatten(x, outdim=1)
Similar to :func:`reshape`, but the shape is inferred from the shape of `x`. Similar to :func:`reshape`, but the shape is inferred from the shape of `x`.
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论