nicolaspanel / numjs

Like NumPy, in JavaScript
MIT License
2.4k stars 184 forks source link

Feature Request: Other padding modes for convolve #105

Open awillats opened 3 years ago

awillats commented 3 years ago

Currently only the 'valid' mode of convolution is supported. I'd like to help add support for the 'same' and 'full' padding modes included in most other implementations of convolution:

visual explanation of convolution padding modes matlab implementation numpy implementation a little more discussion

I've hacked together something simple for the problem I have that implements this, (and verified it against numpy's implementation) so I'm happy to help with a pull request! But I'd need a little help formatting it in a clean consistent way (not sure how to set up the spec.js etc.)