提交 5123ad72 authored 作者: Frederic's avatar Frederic

Small doc formating fix

上级 5633da0c
......@@ -3306,13 +3306,15 @@ def addbroadcast(x, *axes):
Input theano tensor.
axis : an int or an iterable object such as list or tuple
of int values
The dimension along which the tensor x should be broadcastable.
if the length of x along these dimensions is not 1,
a ValueError will be raised.
The dimension along which the tensor x should be
broadcastable. if the length of x along these
dimensions is not 1, a ValueError will be raised.
returns:
----------
a theano tensor, which is broadcastable along the specified dimensions.
"""
rval = Rebroadcast(*[(axis, True) for axis in axes])(x)
return theano.tensor.opt.apply_rebroadcast_opt(rval)
......@@ -3334,13 +3336,15 @@ def unbroadcast(x, *axes):
Input theano tensor.
axis : an int or an iterable object such as list or tuple
of int values
The dimension along which the tensor x should be unbroadcastable.
if the length of x along these dimensions is not 1,
a ValueError will be raised.
The dimension along which the tensor x should be
unbroadcastable. if the length of x along these
dimensions is not 1, a ValueError will be raised.
returns:
----------
a theano tensor, which is unbroadcastable along the specified dimensions.
"""
rval = Rebroadcast(*[(axis, False) for axis in axes])(x)
return theano.tensor.opt.apply_rebroadcast_opt(rval)
......@@ -3363,6 +3367,7 @@ def patternbroadcast(x, broadcastable):
Input theano tensor.
broadcastable : an iterable object such as list or tuple
of bool values
a set of boolean values indicating whether a dimension
should be broadcastable or not.
if the length of x along these dimensions is not 1,
......
......@@ -456,6 +456,7 @@ def bincount(x, weights=None, minlength=None, assert_nonneg=False):
:param assert_nonneg: A flag that inserts an assert_op to check if
every input x is nonnegative.
Optional.
.. versionadded:: 0.6
"""
compatible_type = ('int8', 'int16', 'int32', 'int64',
......@@ -521,7 +522,7 @@ def compress(condition, x, axis=None):
:param x: Input data, tensor variable
:param condition: 1 dimensional array of non-zero and zero values
corresponding to indices of slices along a selected axis
corresponding to indices of slices along a selected axis
:return: `x` with selected slices
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论