Skip to content

Commit

Permalink
Update math.py
Browse files Browse the repository at this point in the history
  • Loading branch information
BrilliantYuKaimin committed Apr 22, 2022
1 parent c96fe8d commit 879a591
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions python/paddle/tensor/math.py
Original file line number Diff line number Diff line change
Expand Up @@ -4414,17 +4414,17 @@ def angle(x, name=None):

def heaviside(x, y, name=None):
"""
Computes the Heaviside step function determined by corresponding element in y for each element in x. The equation is:
Computes the Heaviside step function determined by corresponding element in y for each element in x. The equation is
.. math::
heaviside(x, y)=
\left\{
\begin{array}{lcl}
0,& &\text{if } \ x < 0, \\
y,& &\text{if } \ x = 0, \\
1,& &\text{if } \ x > 0.
\\begin{array}{lcl}
0,& &\\text{if} \ x < 0, \\
y,& &\\text{if} \ x = 0, \\
1,& &\\text{if} \ x > 0.
\end{array}
\right.
\\right.
Notes:
``paddle.heaviside`` supports broadcasting. If you want know more about broadcasting, please refer to :ref:`user_guide_broadcasting`.
Expand Down

0 comments on commit 879a591

Please sign in to comment.