Skip to content

Commit f0d5cfb

Browse files
Apply suggestions from code review
Co-authored-by: Anton <[email protected]>
1 parent d4608f5 commit f0d5cfb

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

Diff for: dpnp/dpnp_iface_statistics.py

+4-2
Original file line numberDiff line numberDiff line change
@@ -418,18 +418,19 @@ def convolve(a, v, mode="full", method="auto"):
418418
419419
Note: Use of the FFT convolution on input containing NAN or INF
420420
will lead to the entire output being NAN or INF.
421-
Use method='direct' when your input contains NAN or INF values.
421+
Use ``method='direct'`` when your input contains NAN or INF values.
422422
423423
Default: ``'auto'``.
424424
425425
Returns
426426
-------
427-
out : ndarray
427+
out : dpnp.ndarray
428428
Discrete, linear convolution of `a` and `v`.
429429
430430
See Also
431431
--------
432432
:obj:`dpnp.correlate` : Cross-correlation of two 1-dimensional sequences.
433+
433434
Notes
434435
-----
435436
The discrete convolution operation is defined as
@@ -471,6 +472,7 @@ def convolve(a, v, mode="full", method="auto"):
471472
472473
>>> np.convolve(a, v, 'valid')
473474
array([2.5], dtype=float32)
475+
474476
"""
475477

476478
dpnp.check_supported_arrays_type(a, v)

Diff for: dpnp/tests/test_statistics.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -282,8 +282,8 @@ def test_convolve_shape_error(self, a, v):
282282

283283
@pytest.mark.parametrize("size", [2, 10**1, 10**2, 10**3, 10**4, 10**5])
284284
def test_convolve_different_sizes(self, size):
285-
a = numpy.random.rand(size).astype(numpy.float32)
286-
v = numpy.random.rand(size // 2).astype(numpy.float32)
285+
a = generate_random_numpy_array(size, dtype=numpy.float32, low=0, high=1)
286+
v = generate_random_numpy_array(size // 2, dtype=numpy.float32, low=0, high=1)
287287

288288
ad = dpnp.array(a)
289289
vd = dpnp.array(v)

Diff for: dpnp/tests/third_party/cupy/math_tests/test_misc.py

-2
Original file line numberDiff line numberDiff line change
@@ -531,7 +531,6 @@ def test_heaviside_nan_inf(self, xp, dtype_1, dtype_2):
531531
}
532532
)
533533
)
534-
# @pytest.mark.skip("convolve() is not implemented yet")
535534
class TestConvolveShapeCombination:
536535

537536
@testing.for_all_dtypes(no_float16=True)
@@ -542,7 +541,6 @@ def test_convolve(self, xp, dtype):
542541
return xp.convolve(a, b, mode=self.mode)
543542

544543

545-
# @pytest.mark.skip("convolve() is not implemented yet")
546544
@pytest.mark.parametrize("mode", ["valid", "same", "full"])
547545
class TestConvolve:
548546

0 commit comments

Comments
 (0)