@@ -428,6 +428,8 @@ def _process_ediff1d_args(arg, arg_name, ary_dtype, ary_sycl_queue, usm_type):
428
428
x2 : {dpnp.ndarray, usm_ndarray, scalar}
429
429
Second input array, also expected to have numeric data type.
430
430
Both inputs `x1` and `x2` can not be scalars at the same time.
431
+ If ``x1.shape != x2.shape``, they must be broadcastable to a common shape
432
+ (which becomes the shape of the output).
431
433
out : {None, dpnp.ndarray, usm_ndarray}, optional
432
434
Output array to populate.
433
435
Array must have the correct shape and the expected data type.
@@ -791,7 +793,7 @@ def convolve(a, v, mode="full"):
791
793
return call_origin (numpy .convolve , a = a , v = v , mode = mode )
792
794
793
795
794
- _COPYSING_DOCSTRING = """
796
+ _COPYSIGN_DOCSTRING = """
795
797
Composes a floating-point value with the magnitude of `x1_i` and the sign of
796
798
`x2_i` for each element of input arrays `x1` and `x2`.
797
799
@@ -806,6 +808,8 @@ def convolve(a, v, mode="full"):
806
808
Second input array, also expected to have a real floating-point data
807
809
type.
808
810
Both inputs `x1` and `x2` can not be scalars at the same time.
811
+ If ``x1.shape != x2.shape``, they must be broadcastable to a common shape
812
+ (which becomes the shape of the output).
809
813
out : {None, dpnp.ndarray, usm_ndarray}, optional
810
814
Output array to populate.
811
815
Array must have the correct shape and the expected data type.
@@ -852,7 +856,7 @@ def convolve(a, v, mode="full"):
852
856
"copysign" ,
853
857
ti ._copysign_result_type ,
854
858
ti ._copysign ,
855
- _COPYSING_DOCSTRING ,
859
+ _COPYSIGN_DOCSTRING ,
856
860
)
857
861
858
862
@@ -1462,6 +1466,8 @@ def diff(a, n=1, axis=-1, prepend=None, append=None):
1462
1466
x2 : {dpnp.ndarray, usm_ndarray, scalar}
1463
1467
Second input array, also expected to have numeric data type.
1464
1468
Both inputs `x1` and `x2` can not be scalars at the same time.
1469
+ If ``x1.shape != x2.shape``, they must be broadcastable to a common shape
1470
+ (which becomes the shape of the output).
1465
1471
out : {None, dpnp.ndarray, usm_ndarray}, optional
1466
1472
Output array to populate.
1467
1473
Array must have the correct shape and the expected data type.
@@ -1759,6 +1765,8 @@ def ediff1d(ary, to_end=None, to_begin=None):
1759
1765
x2 : {dpnp.ndarray, usm_ndarray, scalar}
1760
1766
Second input array, also expected to floating-point data types.
1761
1767
Both inputs `x1` and `x2` can not be scalars at the same time.
1768
+ If ``x1.shape != x2.shape``, they must be broadcastable to a common shape
1769
+ (which becomes the shape of the output).
1762
1770
out : {None, dpnp.ndarray, usm_ndarray}, optional
1763
1771
Output array to populate. Array must have the correct shape and
1764
1772
the expected data type.
@@ -1910,6 +1918,8 @@ def ediff1d(ary, to_end=None, to_begin=None):
1910
1918
x2 : {dpnp.ndarray, usm_ndarray, scalar}
1911
1919
Second input array, also expected to have numeric data type.
1912
1920
Both inputs `x1` and `x2` can not be scalars at the same time.
1921
+ If ``x1.shape != x2.shape``, they must be broadcastable to a common shape
1922
+ (which becomes the shape of the output).
1913
1923
out : {None, dpnp.ndarray, usm_ndarray}, optional
1914
1924
Output array to populate.
1915
1925
Array must have the correct shape and the expected data type.
@@ -1984,6 +1994,8 @@ def ediff1d(ary, to_end=None, to_begin=None):
1984
1994
x2 : {dpnp.ndarray, usm_ndarray, scalar}
1985
1995
Second input array, also expected to have numeric data type.
1986
1996
Both inputs `x1` and `x2` can not be scalars at the same time.
1997
+ If ``x1.shape != x2.shape``, they must be broadcastable to a common shape
1998
+ (which becomes the shape of the output).
1987
1999
out : {None, dpnp.ndarray, usm_ndarray}, optional
1988
2000
Output array to populate.
1989
2001
Array must have the correct shape and the expected data type.
@@ -2069,6 +2081,8 @@ def ediff1d(ary, to_end=None, to_begin=None):
2069
2081
x2 : {dpnp.ndarray, usm_ndarray, scalar}
2070
2082
Second input array, also expected to have numeric data type.
2071
2083
Both inputs `x1` and `x2` can not be scalars at the same time.
2084
+ If ``x1.shape != x2.shape``, they must be broadcastable to a common shape
2085
+ (which becomes the shape of the output).
2072
2086
out : {None, dpnp.ndarray, usm_ndarray}, optional
2073
2087
Output array to populate.
2074
2088
Array must have the correct shape and the expected data type.
@@ -2151,6 +2165,8 @@ def ediff1d(ary, to_end=None, to_begin=None):
2151
2165
x2 : {dpnp.ndarray, usm_ndarray, scalar}
2152
2166
Second input array, also expected to have a real-valued data type.
2153
2167
Both inputs `x1` and `x2` can not be scalars at the same time.
2168
+ If ``x1.shape != x2.shape``, they must be broadcastable to a common shape
2169
+ (which becomes the shape of the output).
2154
2170
out : {None, dpnp.ndarray, usm_ndarray}, optional
2155
2171
Output array to populate.
2156
2172
Array must have the correct shape and the expected data type.
@@ -2220,8 +2236,8 @@ def ediff1d(ary, to_end=None, to_begin=None):
2220
2236
x2 : {dpnp.ndarray, usm_ndarray, scalar}
2221
2237
Second input array, also expected to have an integer data type.
2222
2238
Both inputs `x1` and `x2` can not be scalars at the same time.
2223
- x : {dpnp.ndarray, usm_ndarray}
2224
- An array of floats to be rounded .
2239
+ If ``x1.shape != x2.shape``, they must be broadcastable to a common shape
2240
+ (which becomes the shape of the output) .
2225
2241
out : {None, dpnp.ndarray, usm_ndarray}, optional
2226
2242
Output array to populate.
2227
2243
Array must have the correct shape and the expected data type.
@@ -2484,6 +2500,8 @@ def gradient(f, *varargs, axis=None, edge_order=1):
2484
2500
x2 : {dpnp.ndarray, usm_ndarray, scalar}
2485
2501
The value of the function when `x1` is ``0``.
2486
2502
Both inputs `x1` and `x2` can not be scalars at the same time.
2503
+ If ``x1.shape != x2.shape``, they must be broadcastable to a common shape
2504
+ (which becomes the shape of the output).
2487
2505
out : {None, dpnp.ndarray, usm_ndarray}, optional
2488
2506
Output array to populate.
2489
2507
Array must have the correct shape and the expected data type.
@@ -2576,7 +2594,8 @@ def gradient(f, *varargs, axis=None, edge_order=1):
2576
2594
Input array, expected to have numeric data type.
2577
2595
out : {None, dpnp.ndarray, usm_ndarray}, optional
2578
2596
Output array to populate.
2579
- Array must have the correct shape and the expected data type.
2597
+ Array must have a shape that the input broadcast to and
2598
+ the expected data type.
2580
2599
Default: ``None``.
2581
2600
order : {"C", "F", "A", "K"}, optional
2582
2601
Memory layout of the newly output array, if parameter `out` is ``None``.
@@ -2636,6 +2655,8 @@ def gradient(f, *varargs, axis=None, edge_order=1):
2636
2655
x2 : {dpnp.ndarray, usm_ndarray, scalar}
2637
2656
Second input array, also expected to have an integer data type.
2638
2657
Both inputs `x1` and `x2` can not be scalars at the same time.
2658
+ If ``x1.shape != x2.shape``, they must be broadcastable to a common shape
2659
+ (which becomes the shape of the output).
2639
2660
out : {None, dpnp.ndarray, usm_ndarray}, optional
2640
2661
Output array to populate.
2641
2662
Array must have the correct shape and the expected data type.
@@ -2693,6 +2714,8 @@ def gradient(f, *varargs, axis=None, edge_order=1):
2693
2714
x2 : {dpnp.ndarray, usm_ndarray, scalar}
2694
2715
Array of exponents of two, expected to have an integer data type.
2695
2716
Both inputs `x1` and `x2` can not be scalars at the same time.
2717
+ If ``x1.shape != x2.shape``, they must be broadcastable to a common shape
2718
+ (which becomes the shape of the output).
2696
2719
out : {None, dpnp.ndarray, usm_ndarray}, optional
2697
2720
Output array to populate. Array must have the correct shape and
2698
2721
the expected data type.
@@ -2758,6 +2781,8 @@ def gradient(f, *varargs, axis=None, edge_order=1):
2758
2781
x2 : {dpnp.ndarray, usm_ndarray, scalar}
2759
2782
Second input array, also expected to have numeric data type.
2760
2783
Both inputs `x1` and `x2` can not be scalars at the same time.
2784
+ If ``x1.shape != x2.shape``, they must be broadcastable to a common shape
2785
+ (which becomes the shape of the output).
2761
2786
out : {None, dpnp.ndarray, usm_ndarray}, optional
2762
2787
Output array to populate.
2763
2788
Array must have the correct shape and the expected data type.
@@ -2838,6 +2863,8 @@ def gradient(f, *varargs, axis=None, edge_order=1):
2838
2863
x2 : {dpnp.ndarray, usm_ndarray, scalar}
2839
2864
Second input array, also expected to have numeric data type.
2840
2865
Both inputs `x1` and `x2` can not be scalars at the same time.
2866
+ If ``x1.shape != x2.shape``, they must be broadcastable to a common shape
2867
+ (which becomes the shape of the output).s
2841
2868
out : {None, dpnp.ndarray, usm_ndarray}, optional
2842
2869
Output array to populate.
2843
2870
Array must have the correct shape and the expected data type.
@@ -2943,6 +2970,8 @@ def modf(x1, **kwargs):
2943
2970
x2 : {dpnp.ndarray, usm_ndarray, scalar}
2944
2971
Second input array, also expected to have numeric data type.
2945
2972
Both inputs `x1` and `x2` can not be scalars at the same time.
2973
+ If ``x1.shape != x2.shape``, they must be broadcastable to a common shape
2974
+ (which becomes the shape of the output).
2946
2975
out : {None, dpnp.ndarray, usm_ndarray}, optional
2947
2976
Output array to populate.
2948
2977
Array must have the correct shape and the expected data type.
@@ -3205,6 +3234,8 @@ def nan_to_num(x, copy=True, nan=0.0, posinf=None, neginf=None):
3205
3234
x2 : {dpnp.ndarray, usm_ndarray, scalar}
3206
3235
The direction where to look for the next representable value of `x1`.
3207
3236
Both inputs `x1` and `x2` can not be scalars at the same time.
3237
+ If ``x1.shape != x2.shape``, they must be broadcastable to a common shape
3238
+ (which becomes the shape of the output).
3208
3239
out : {None, dpnp.ndarray, usm_ndarray}, optional
3209
3240
Output array to populate. Array must have the correct shape and
3210
3241
the expected data type.
@@ -3326,6 +3357,8 @@ def nan_to_num(x, copy=True, nan=0.0, posinf=None, neginf=None):
3326
3357
x2 : {dpnp.ndarray, usm_ndarray, scalar}
3327
3358
Second input array, also expected to have numeric data type.
3328
3359
Both inputs `x1` and `x2` can not be scalars at the same time.
3360
+ If ``x1.shape != x2.shape``, they must be broadcastable to a common shape
3361
+ (which becomes the shape of the output).
3329
3362
out : {None, dpnp.ndarray, usm_ndarray}, optional
3330
3363
Output array to populate. Array must have the correct shape and
3331
3364
the expected data type.
@@ -3688,6 +3721,8 @@ def real_if_close(a, tol=100):
3688
3721
x2 : {dpnp.ndarray, usm_ndarray, scalar}
3689
3722
Second input array, also expected to have a real-valued data type.
3690
3723
Both inputs `x1` and `x2` can not be scalars at the same time.
3724
+ If ``x1.shape != x2.shape``, they must be broadcastable to a common shape
3725
+ (which becomes the shape of the output).
3691
3726
out : {None, dpnp.ndarray, usm_ndarray}, optional
3692
3727
Output array to populate.
3693
3728
Array must have the correct shape and the expected data type.
@@ -4114,6 +4149,8 @@ def real_if_close(a, tol=100):
4114
4149
x2 : {dpnp.ndarray, usm_ndarray, scalar}
4115
4150
Second input array, also expected to have numeric data type.
4116
4151
Both inputs `x1` and `x2` can not be scalars at the same time.
4152
+ If ``x1.shape != x2.shape``, they must be broadcastable to a common shape
4153
+ (which becomes the shape of the output).
4117
4154
out : {None, dpnp.ndarray, usm_ndarray}, optional
4118
4155
Output array to populate.
4119
4156
Array must have the correct shape and the expected data type.
0 commit comments