Closed ClaudiaComito closed 2 months ago
Thank you for the PR!
Thank you for the PR!
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 91.89%. Comparing base (
064f495
) to head (332ae51
). Report is 239 commits behind head on main.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Thank you for the PR!
Thank you for the PR!
Thank you for the PR!
@JuanPedroGHM @krajsek @mrfh92 thanks for reviewing, I think I addressed all points, let me know if something's missing.
Due Diligence
Description
This PR expands
ht.signal.convolve
to perform 1-D convolutions on a batch of 1-D arrays, i.e.if
signal.shape = (..., n)
andkernel.shape = (m,)
:signal
's last dimension will be convolved withkernel
.if e.g.
signal.shape = (i, j, n)
andkernel.shape = (i, j, m,)
: each elementsignal[i, j]
of sizen
will be convolved with the corresponding elementkernel[i,j]
of sizem
.Signal and kernel can be any number of dimensions, as long as the batch dimensions match.
Signal and kernel can be distributed along any of the batch dimensions.
Issue/s resolved: #1514 Related: #1396
Changes proposed:
Type of change
Memory requirements
Performance
Does this change modify the behaviour of other functions? If so, which?
yes, instead of returning
ValueError
whensignal
is n-D,ht.convolve
now raises a ValueError only if batch convolution isn't possible (shapes mismatch, unsuitable distribution)