Skip to content

Commit

Permalink
Merge pull request #4515 from hvy/bp-4495-document-arithmetic-specials
Browse files Browse the repository at this point in the history
[backport] document arithmetic special functions
  • Loading branch information
kmaehashi committed Mar 22, 2018
2 parents 50255f2 + 6002fc4 commit 3230942
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions docs/source/_templates/autosummary/class.rst
Expand Up @@ -38,6 +38,16 @@
.. automethod:: {{ item }}
{% endif %}
{%- endfor %}

..
Special (arithmetic) methods
{% for item in ('__neg__', '__abs__', '__add__', '__radd__', '__sub__', '__rsub__', '__mul__', '__rmul__', '__div__', '__truediv__', '__rdiv__', '__rtruediv__', '__floordiv__', '__rfloordiv__', '__pow__', '__rpow__', '__matmul__', '__rmatmul__') %}
{% if item in all_methods %}
.. automethod:: {{ item }}
{% endif %}
{%- endfor %}

{% endblock %}

..
Expand Down

0 comments on commit 3230942

Please sign in to comment.