Closed
Description
@certik Builtin %
in LPython doesn't work on arrays by default because it is implemented as a function and not a binop
. So the question is which approach to follow,
- To make
_mod
function defined inlpython_builtin.py
vectorised; - Define
Mod
asbinop
and then usebuilder->CreateSRem
in LLVM backend. Note that not all backends might support modulus operation on types other than integers. - Define
mod
and then make it vectorisable.
I think 3rd approach is a good one and complies with Python and NumPy standards. What do you say @certik?
Originally posted by @czgdp1807 in #1002 (comment)
Metadata
Metadata
Assignees
Labels
No labels