Add broadcasting support for map_, map2_.

This commit is contained in:
Gregory Chanan
2017-05-26 11:38:27 -07:00
committed by Soumith Chintala
parent ec120fac0c
commit c54e532954
4 changed files with 123 additions and 18 deletions

View File

@ -792,8 +792,10 @@ add_docstr(torch._C.FloatTensorBase.map_,
map_(tensor, callable)
Applies :attr:`callable` for each element in this tensor and the given tensor
and stores the results in this tensor. The :attr:`callable` should have the
signature::
and stores the results in this tensor. This tensor and the given tensor must be
:ref:`broadcastable <broadcasting-semantics>`.
The :attr:`callable` should have the signature::
def callable(a, b) -> number
""")