Open 20akshay00 opened 1 month ago
At the same time, we can probably also add convolve1d
. NumPy has it too, and xtensor at least has an implementation for 1D convolutions (even if it's a bit... manual).
With #110 implemented, 2D and 1D convolutions are already possible. Explicitly 2D and 1D convolutions should still be implemented since they're the most common by far, and are likely to benefit from optimization.
An analogue of scipy.signal.convolve2d would be extremely useful to simulate the following classes of models for example:
1) Cellular automata, where we typically perform computations based on the neighbours of a cell. The SIRS demo is currently held back due to this.
2) 2D Differential equations, where we need to apply a Laplacian operation which manifests as a convolution on a discrete grid. Alternatively, this can be implemented through matrix multiplication also.
3) Image processing of course.
Perhaps a case can be made that this is a fairly specialized function similar to a
fft
orquadgk
, etc. Whether it is general enough to warrant addition into NumDot or if these things must be maintained in a separate SciDot project is up for discussion.ToDo