File tree Expand file tree Collapse file tree 1 file changed +12
-3
lines changed
spec/API_specification/array_api Expand file tree Collapse file tree 1 file changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -1955,13 +1955,22 @@ def sinh(x: array, /) -> array:
19551955 """
19561956
19571957def square (x : array , / ) -> array :
1958- """
1959- Squares (``x_i * x_i``) each element ``x_i`` of the input array ``x``.
1958+ r"""
1959+ Squares each element ``x_i`` of the input array ``x``.
1960+
1961+ The square of a number ``x_i`` is defined as
1962+
1963+ .. math::
1964+ x_i^2 = x_i \cdot x_i
1965+
1966+ **Special cases**
1967+
1968+ For floating-point operands, special cases must be handled as if the operation is implemented as ``x * x`` (see :func:`~array_api.multiply`).
19601969
19611970 Parameters
19621971 ----------
19631972 x: array
1964- input array. Should have a real-valued data type.
1973+ input array. Should have a numeric data type.
19651974
19661975 Returns
19671976 -------
You can’t perform that action at this time.
0 commit comments