提交 4e9d23c5 authored 作者: Tanjay94's avatar Tanjay94 提交者: Frederic

Added choose function in tensor/var.py

上级 5961fe59
......@@ -583,6 +583,9 @@ class _tensor_py_operators:
"""Fill inputted tensor with the assigned value"""
return theano.tensor.basic.fill(self, value)
def choose(self, a, choices, out=None, mode='raise'):
"""Construct an array from an index array and a set of arrays to choose from."""
return theano.tensor.basic.choose(self, a, choices, out=None, mode='raise')
class TensorVariable(_tensor_py_operators, Variable):
"""Subclass to add the tensor operators to the basic `Variable` class."""
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论