Python operators
Last updated
Last updated
The representation of Python operators in Nelson.
Nelson facilitates the utilization of the subsequent overloaded operators:
Python Operator Symbol | Python Methods | Nelson Methods |
---|---|---|
isequal builtin is also overloaded to manage python type.
For numpy types, isequal call numpy.array_equal from python.
Others python operators are currently not supported.
Allan CORNET
Version | Description |
---|---|
- (unary operator)
__neg__
uminus, -a
+ (unary operator)
__pos__
uplus, +a
+ (binary operator)
__add__, __radd__
plus, +
- (binary operator)
__sub__, __rsub__
minus, -
* (binary operator)
__mul__, __rmul__
mtimes, *
/ (binary operator)
__truediv__, __rtruediv__
mrdivide, /
== (binary operator)
__eq__
eq, ==
> (binary operator)
__gt__
gt, >
< (binary operator)
__lt__
lt, <
!= (binary operator)
__ne__
ne, ~=
>= (binary operator)
__ge__
ge, >=
<= (binary operator)
__le__
le, <=
1.5.0
initial version