|
91 | 91 | "clip",
|
92 | 92 | "conj",
|
93 | 93 | "conjugate",
|
| 94 | + "convolve", |
94 | 95 | "copysign",
|
95 | 96 | "cross",
|
96 | 97 | "cumprod",
|
@@ -611,7 +612,7 @@ def around(x, /, decimals=0, out=None):
|
611 | 612 | Parameters
|
612 | 613 | ----------
|
613 | 614 | x : {dpnp.ndarray, usm_ndarray}
|
614 |
| - Input array, expected to have a real-valued data type. |
| 615 | + Input array, expected to have a boolean or real-valued data type. |
615 | 616 | out : {None, dpnp.ndarray, usm_ndarray}, optional
|
616 | 617 | Output array to populate.
|
617 | 618 | Array must have the correct shape and the expected data type.
|
@@ -791,6 +792,24 @@ def clip(a, /, min=None, max=None, *, out=None, order="K", **kwargs):
|
791 | 792 |
|
792 | 793 | conj = conjugate
|
793 | 794 |
|
| 795 | + |
| 796 | +def convolve(a, v, mode="full"): |
| 797 | + """ |
| 798 | + Returns the discrete, linear convolution of two one-dimensional sequences. |
| 799 | +
|
| 800 | + For full documentation refer to :obj:`numpy.convolve`. |
| 801 | +
|
| 802 | + Examples |
| 803 | + -------- |
| 804 | + >>> ca = dpnp.convolve([1, 2, 3], [0, 1, 0.5]) |
| 805 | + >>> print(ca) |
| 806 | + [0. , 1. , 2.5, 4. , 1.5] |
| 807 | +
|
| 808 | + """ |
| 809 | + |
| 810 | + return call_origin(numpy.convolve, a=a, v=v, mode=mode) |
| 811 | + |
| 812 | + |
794 | 813 | _COPYSIGN_DOCSTRING = """
|
795 | 814 | Composes a floating-point value with the magnitude of `x1_i` and the sign of
|
796 | 815 | `x2_i` for each element of input arrays `x1` and `x2`.
|
@@ -1878,7 +1897,7 @@ def ediff1d(ary, to_end=None, to_begin=None):
|
1878 | 1897 | Parameters
|
1879 | 1898 | ----------
|
1880 | 1899 | x : {dpnp.ndarray, usm_ndarray}
|
1881 |
| - Input array, expected to have a real-valued data type. |
| 1900 | + Input array, expected to have a boolean or real-valued data type. |
1882 | 1901 | out : {None, dpnp.ndarray, usm_ndarray}, optional
|
1883 | 1902 | Output array to populate.
|
1884 | 1903 | Array must have the correct shape and the expected data type.
|
@@ -4551,7 +4570,7 @@ def trapezoid(y, x=None, dx=1.0, axis=-1):
|
4551 | 4570 | Parameters
|
4552 | 4571 | ----------
|
4553 | 4572 | x : {dpnp.ndarray, usm_ndarray}
|
4554 |
| - Input array, expected to have a real-valued data type. |
| 4573 | + Input array, expected to have a boolean or real-valued data type. |
4555 | 4574 | out : {None, dpnp.ndarray, usm_ndarray}, optional
|
4556 | 4575 | Output array to populate.
|
4557 | 4576 | Array must have the correct shape and the expected data type.
|
|
0 commit comments