aesara
aesara copied to clipboard
The naming of the division `Op`s is inconsistent with NumPy's
Numpy provides the following API to perform division element-wise:
import numpy as np
np.true_divide
np.divide # alias to `numpy.true_divide`
np.floor_divide
While Aesara uses the following names:
import aesara.tensor as at
at.true_div
at.floor_div
at.int_div # an alias for `floor_div`
My suggestion is thus
- [x]
s/at.true_div/at.true_divide - [x]
s/at.floor_div/at.floor_divide - [x] Deprecate the alias
at.int_div - [x] Add an alias
at.dividetoat.true_divide
And while we're at it:
- [ ] Rename
at.modtoat.remainderand setat.modas an alias toat.remainder(like NumPy) - [ ] Add
at.fmod
As an aside the documentation does not reference the API that is currently implemented, it stills references truediv, intdiv and floordiv instead of respectively true_div, int_div and floor_div.
should we keep treu_div and create one more true_divide instance, or should we completely replace true_div with true_divide?
Since some code probably relies on true_div we should:
(1) Replace true_div with true_divide throughout the codebase
(2) Create a true_div alias
(3) Add a deprecation warning for those trying to use said alias.
We should open issues for the remaining items.