Skip to content

Commit 8bd1bad

Browse files
Merge branch 'correlate_fft' into convolve
2 parents b39e5c9 + 6435dc6 commit 8bd1bad

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

dpnp/dpnp_iface_statistics.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -324,7 +324,7 @@ def average(a, axis=None, weights=None, returned=False, *, keepdims=False):
324324

325325

326326
def _get_padding(a_size, v_size, mode):
327-
assert v_size > a_size
327+
assert a.size >= v.size
328328

329329
if mode == "valid":
330330
l_pad, r_pad = 0, 0
@@ -731,20 +731,20 @@ def correlate(a, v, mode="valid", method="auto"):
731731
is ``"valid"``, unlike :obj:`dpnp.convolve`, which uses ``"full"``.
732732
733733
Default: ``"valid"``.
734-
method : {'auto', 'direct', 'fft'}, optional
735-
`'direct'`: The correlation is determined directly from sums.
734+
method : {"auto", "direct", "fft"}, optional
735+
`"direct"`: The correlation is determined directly from sums.
736736
737-
`'fft'`: The Fourier Transform is used to perform the calculations.
737+
`"fft"`: The Fourier Transform is used to perform the calculations.
738738
This method is faster for long sequences but can have accuracy issues.
739739
740-
`'auto'`: Automatically chooses direct or Fourier method based on
740+
`"auto"`: Automatically chooses direct or Fourier method based on
741741
an estimate of which is faster.
742742
743743
Note: Use of the FFT convolution on input containing NAN or INF
744744
will lead to the entire output being NAN or INF.
745745
Use method='direct' when your input contains NAN or INF values.
746746
747-
Default: ``'auto'``.
747+
Default: ``"auto"``.
748748
749749
Notes
750750
-----

0 commit comments

Comments
 (0)