xray.ufuncs.square¶
- xray.ufuncs.square(*args, **kwargs)¶
xray specific variant of numpy.square. Handles xray.Dataset, xray.DataArray, xray.Variable, numpy.ndarray and dask.array.Array objects with automatic dispatching.
Documentation from numpy:
square(x[, out])
Return the element-wise square of the input.
Parameters: x : array_like
Input data.
Returns: out : ndarray
Element-wise x*x, of the same shape and dtype as x. Returns scalar if x is a scalar.
See also
numpy.linalg.matrix_power, sqrt, power
Examples
>>> np.square([-1j, 1]) array([-1.-0.j, 1.+0.j])