@@ -301,7 +301,7 @@ def process(self, r, pstate):
301301class Elemwise (OpenMPOp ):
302302 """Generalizes a scalar `Op` to tensors.
303303
304- All the inputs must have the same number of dimensions. When the
304+ ` All the inputs must have the same number of dimensions. When the
305305 `Op` is performed, for each dimension, each input's size for that
306306 dimension must be the same. As a special case, it can also be one
307307 but only if the input's `broadcastable` flag is ``True`` for that
@@ -1645,25 +1645,6 @@ def scalar_elemwise(*symbol, nfunc=None, nin=None, nout=None, symbolname=None):
16451645 should take nin + nout inputs. `nout == 0` means that the numpy function does
16461646 not take a NumPy array argument to put its result in.
16471647
1648- This decorator is used to create element-wise operations on tensors.
1649- It transforms scalar operations (those that work on individual values)
1650- into operations that work on entire tensors by applying the scalar
1651- operation to each element of the tensor.
1652-
1653- Examples
1654- --------
1655- @scalar_elemwise
1656- def add(a, b):
1657- "Add two values together."
1658- # The actual implementation is provided by the decorator
1659-
1660- x = tensor('x')
1661- y = tensor('y')
1662- z = add(x, y) # Creates a computational graph node
1663-
1664- The decorator creates an Elemwise op that handles broadcasting,
1665- different input shapes, dtype conversions, and other details needed
1666- for tensor operations.
16671648 """
16681649 import pytensor .scalar as scalar
16691650
@@ -1686,7 +1667,7 @@ def construct(symbol):
16861667 rval = Elemwise (scalar_op , nfunc_spec = (nfunc and (nfunc , nin , nout )))
16871668
16881669 if getattr (symbol , "__doc__" ):
1689- rval .__doc__ = symbol .__doc__ + " \n \n " + rval . __doc__
1670+ rval .__doc__ = symbol .__doc__
16901671
16911672 # for the meaning of this see the ./epydoc script
16921673 # it makes epydoc display rval as if it were a function, not an object
0 commit comments