@@ -2245,63 +2245,6 @@ def gradient(f, *varargs, axis=None, edge_order=1):
2245
2245
)
2246
2246
2247
2247
2248
- def mod (
2249
- x1 ,
2250
- x2 ,
2251
- / ,
2252
- out = None ,
2253
- * ,
2254
- where = True ,
2255
- order = "K" ,
2256
- dtype = None ,
2257
- subok = True ,
2258
- ** kwargs ,
2259
- ):
2260
- """
2261
- Compute element-wise remainder of division.
2262
-
2263
- For full documentation refer to :obj:`numpy.mod`.
2264
-
2265
- Returns
2266
- -------
2267
- out : dpnp.ndarray
2268
- The element-wise remainder of the quotient `floor_divide(x1, x2)`.
2269
-
2270
- Limitations
2271
- -----------
2272
- Parameters `x1` and `x2` are supported as either scalar,
2273
- :class:`dpnp.ndarray` or :class:`dpctl.tensor.usm_ndarray`, but both `x1`
2274
- and `x2` can not be scalars at the same time.
2275
- Parameters `where`, `dtype` and `subok` are supported with their default
2276
- values.
2277
- Keyword argument `kwargs` is currently unsupported.
2278
- Otherwise the function will be executed sequentially on CPU.
2279
- Input array data types are limited by supported DPNP :ref:`Data types`.
2280
-
2281
- See Also
2282
- --------
2283
- :obj:`dpnp.fmod` : Calculate the element-wise remainder of division
2284
- :obj:`dpnp.remainder` : Remainder complementary to floor_divide.
2285
- :obj:`dpnp.divide` : Standard division.
2286
-
2287
- Notes
2288
- -----
2289
- This function works the same as :obj:`dpnp.remainder`.
2290
-
2291
- """
2292
-
2293
- return dpnp .remainder (
2294
- x1 ,
2295
- x2 ,
2296
- out = out ,
2297
- where = where ,
2298
- order = order ,
2299
- dtype = dtype ,
2300
- subok = subok ,
2301
- ** kwargs ,
2302
- )
2303
-
2304
-
2305
2248
def modf (x1 , ** kwargs ):
2306
2249
"""
2307
2250
Return the fractional and integral parts of an array, element-wise.
@@ -2818,6 +2761,12 @@ def prod(
2818
2761
:obj:`dpnp.floor_divide` : Compute the largest integer smaller or equal to the division of the inputs.
2819
2762
:obj:`dpnp.mod` : Calculate the element-wise remainder of division.
2820
2763
2764
+ Notes
2765
+ -----
2766
+ Returns ``0`` when `x2` is ``0`` and both `x1` and `x2` are (arrays of)
2767
+ integers.
2768
+ :obj:`dpnp.mod` is an alias of :obj:`dpnp.remainder`.
2769
+
2821
2770
Examples
2822
2771
--------
2823
2772
>>> import dpnp as np
@@ -2843,6 +2792,8 @@ def prod(
2843
2792
binary_inplace_fn = ti ._remainder_inplace ,
2844
2793
)
2845
2794
2795
+ mod = remainder
2796
+
2846
2797
2847
2798
_RINT_DOCSTRING = """
2848
2799
Rounds each element `x_i` of the input array `x` to
0 commit comments