pytensor
pytensor copied to clipboard
Delete `extra_ops.py`, replace with specialized files with more informative names
Description
One might be indexing.py
or index_tricks.py
. That could hold anything related to generating indices or masks (including the new _delta
and _iota
functions introduced in #722.
There could also be a file called makers.py
to hold ops like pt.linspace
that make a useful tensor. pt.arange
kind of straddles between an index and a tensor used in actual computation, so we could have a big debate about where it could go!
Other themes from stuff in extra ops:
- cumulative ops -- these should probably be in basic? Or a file for ops that operate on axes (cum, diff, unique)
- sorting related (sort, searchsorted, binsort) could be in a sort.py
- Several functions related to broadcasting -- broadcasting.py?
- Shape related - ravel, unravel, squeeze
- Fill diag/off-diag sort of falls under the umbrella of indexing if you think about it. But it probably belongs wherever Alloc is defined?
- Real grab-bag functions: CpuContiguous (is this used anywhere?), Bartlett (windowing function -- is this a refugee from the deleted
signal.py
?)
Needs some thought, obviously these are just some ideas to start a discussion.