@@ -199,9 +199,11 @@ def allclose(a, b, rtol=1.0e-5, atol=1.0e-8, equal_nan=False):
199199 Second input array, also expected to have numeric data type.
200200 Both inputs `a` and `b` can not be scalars at the same time.
201201 rtol : {dpnp.ndarray, usm_ndarray, scalar}, optional
202- The relative tolerance parameter. Default: ``1e-05``.
202+ The relative tolerance parameter.
203+ Default: ``1e-05``.
203204 atol : {dpnp.ndarray, usm_ndarray, scalar}, optional
204- The absolute tolerance parameter. Default: ``1e-08``.
205+ The absolute tolerance parameter.
206+ Default: ``1e-08``.
205207 equal_nan : bool
206208 Whether to compare ``NaNs`` as equal. If ``True``, ``NaNs`` in `a` will
207209 be considered equal to ``NaNs`` in `b` in the output array.
@@ -213,14 +215,20 @@ def allclose(a, b, rtol=1.0e-5, atol=1.0e-8, equal_nan=False):
213215 A 0-dim array with ``True`` value if the two arrays are equal within
214216 the given tolerance; with ``False`` otherwise.
215217
216-
217218 See Also
218219 --------
219220 :obj:`dpnp.isclose` : Test whether two arrays are element-wise equal.
220221 :obj:`dpnp.all` : Test whether all elements evaluate to True.
221222 :obj:`dpnp.any` : Test whether any element evaluates to True.
222223 :obj:`dpnp.equal` : Return (x1 == x2) element-wise.
223224
225+ Notes
226+ -----
227+ The comparison of `a` and `b` uses standard broadcasting, which
228+ means that `a` and `b` need not have the same shape in order for
229+ ``dpnp.allclose(a, b)`` to evaluate to ``True``.
230+ The same is true for :obj:`dpnp.equal` but not :obj:`dpnp.array_equal`.
231+
224232 Examples
225233 --------
226234 >>> import dpnp as np
@@ -538,6 +546,8 @@ def array_equiv(a1, a2):
538546x2 : {dpnp.ndarray, usm_ndarray, scalar}
539547 Second input array, also expected to have numeric data type.
540548 Both inputs `x1` and `x2` can not be scalars at the same time.
549+ If ``x1.shape != x2.shape``, they must be broadcastable to a common shape
550+ (which becomes the shape of the output).
541551out : {None, dpnp.ndarray, usm_ndarray}, optional
542552 Output array to populate.
543553 Array have the correct shape and the expected data type.
@@ -609,6 +619,8 @@ def array_equiv(a1, a2):
609619x2 : {dpnp.ndarray, usm_ndarray, scalar}
610620 Second input array, also expected to have numeric data type.
611621 Both inputs `x1` and `x2` can not be scalars at the same time.
622+ If ``x1.shape != x2.shape``, they must be broadcastable to a common shape
623+ (which becomes the shape of the output).
612624out : {None, dpnp.ndarray, usm_ndarray}, optional
613625 Output array to populate.
614626 Array must have the correct shape and the expected data type.
@@ -675,6 +687,8 @@ def array_equiv(a1, a2):
675687x2 : {dpnp.ndarray, usm_ndarray, scalar}
676688 Second input array, also expected to have numeric data type.
677689 Both inputs `x1` and `x2` can not be scalars at the same time.
690+ If ``x1.shape != x2.shape``, they must be broadcastable to a common shape
691+ (which becomes the shape of the output).
678692out : {None, dpnp.ndarray, usm_ndarray}, optional
679693 Output array to populate.
680694 Array must have the correct shape and the expected data type.
@@ -753,9 +767,11 @@ def isclose(a, b, rtol=1e-05, atol=1e-08, equal_nan=False):
753767 Second input array, also expected to have numeric data type.
754768 Both inputs `a` and `b` can not be scalars at the same time.
755769 rtol : {dpnp.ndarray, usm_ndarray, scalar}, optional
756- The relative tolerance parameter. Default: ``1e-05``.
770+ The relative tolerance parameter.
771+ Default: ``1e-05``.
757772 atol : {dpnp.ndarray, usm_ndarray, scalar}, optional
758- The absolute tolerance parameter. Default: ``1e-08``.
773+ The absolute tolerance parameter.
774+ Default: ``1e-08``.
759775 equal_nan : bool
760776 Whether to compare ``NaNs`` as equal. If ``True``, ``NaNs`` in `a` will
761777 be considered equal to ``NaNs`` in `b` in the output array.
@@ -1446,6 +1462,8 @@ def isscalar(element):
14461462x2 : {dpnp.ndarray, usm_ndarray, scalar}
14471463 Second input array, also expected to have numeric data type.
14481464 Both inputs `x1` and `x2` can not be scalars at the same time.
1465+ If ``x1.shape != x2.shape``, they must be broadcastable to a common shape
1466+ (which becomes the shape of the output).
14491467out : {None, dpnp.ndarray, usm_ndarray}, optional
14501468 Output array to populate.
14511469 Array must have the correct shape and the expected data type.
@@ -1512,6 +1530,8 @@ def isscalar(element):
15121530x2 : {dpnp.ndarray, usm_ndarray, scalar}
15131531 Second input array, also expected to have numeric data type.
15141532 Both inputs `x1` and `x2` can not be scalars at the same time.
1533+ If ``x1.shape != x2.shape``, they must be broadcastable to a common shape
1534+ (which becomes the shape of the output).
15151535out : {None, dpnp.ndarray, usm_ndarray}, optional
15161536 Output array to populate.
15171537 Array must have the correct shape and the expected data type.
@@ -1578,6 +1598,8 @@ def isscalar(element):
15781598x2 : {dpnp.ndarray, usm_ndarray, scalar}
15791599 Second input array.
15801600 Both inputs `x1` and `x2` can not be scalars at the same time.
1601+ If ``x1.shape != x2.shape``, they must be broadcastable to a common shape
1602+ (which becomes the shape of the output).
15811603out : {None, dpnp.ndarray, usm_ndarray}, optional
15821604 Output array to populate.
15831605 Array must have the correct shape and the expected data type.
@@ -1590,6 +1612,7 @@ def isscalar(element):
15901612-------
15911613out : dpnp.ndarray
15921614 An array containing the element-wise logical AND results.
1615+ The shape is determined by broadcasting.
15931616
15941617Limitations
15951618-----------
@@ -1699,6 +1722,8 @@ def isscalar(element):
16991722x2 : {dpnp.ndarray, usm_ndarray, scalar}
17001723 Second input array.
17011724 Both inputs `x1` and `x2` can not be scalars at the same time.
1725+ If ``x1.shape != x2.shape``, they must be broadcastable to a common shape
1726+ (which becomes the shape of the output).
17021727out : {None, dpnp.ndarray, usm_ndarray}, optional
17031728 Output array to populate.
17041729 Array must have the correct shape and the expected data type.
@@ -1711,6 +1736,7 @@ def isscalar(element):
17111736-------
17121737out : dpnp.ndarray
17131738 An array containing the element-wise logical OR results.
1739+ The shape is determined by broadcasting.
17141740
17151741Limitations
17161742-----------
@@ -1767,6 +1793,8 @@ def isscalar(element):
17671793x2 : {dpnp.ndarray, usm_ndarray, scalar}
17681794 Second input array.
17691795 Both inputs `x1` and `x2` can not be scalars at the same time.
1796+ If ``x1.shape != x2.shape``, they must be broadcastable to a common shape
1797+ (which becomes the shape of the output).
17701798out : {None, dpnp.ndarray, usm_ndarray}, optional
17711799 Output array to populate.
17721800 Array must have the correct shape and the expected data type.
@@ -1779,6 +1807,7 @@ def isscalar(element):
17791807-------
17801808out : dpnp.ndarray
17811809 An array containing the element-wise logical XOR results.
1810+ The shape is determined by broadcasting.
17821811
17831812Limitations
17841813-----------
@@ -1833,6 +1862,8 @@ def isscalar(element):
18331862x2 : {dpnp.ndarray, usm_ndarray, scalar}
18341863 Second input array, also expected to have numeric data type.
18351864 Both inputs `x1` and `x2` can not be scalars at the same time.
1865+ If ``x1.shape != x2.shape``, they must be broadcastable to a common shape
1866+ (which becomes the shape of the output).
18361867out : {None, dpnp.ndarray, usm_ndarray}, optional
18371868 Output array to populate.
18381869 Array must have the correct shape and the expected data type.
0 commit comments