提交 bc8e89aa authored 作者: James Bergstra's avatar James Bergstra

Added brief documentation of the idx_list structure used in Subtensor and

SetSubtensor.
上级 4e7211fc
......@@ -1624,6 +1624,12 @@ class Subtensor(Op):
inputs array is the tensor x, followed by scalar integer variables.
@todo: add support for advanced tensor indexing (in Subtensor_dx too).
The idx_list is a tuple similar in structure to the sort of key you might expect in numpy's
basic indexing mode. It has one element for each explicitly named dimension. In numpy, the elements
can be either integers or slices containing integers and None. In Subtensor, each element
can additionally be a Scalar instance, and slice components can also be Scalar instances
too.
"""
e_invalid = 'The index list is longer than the number of dimensions of the tensor.'
e_subslice = 'nested slicing is not supported'
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论