bundles / numpy latest / numpy / positive
ufunc
numpy:positive
source: /dev/numpy/build-install/usr/lib/python3.14/site-packages/numpy/__init__.py
Summary
Numerical positive, element-wise.
Parameters
x: array_like or scalarInput array.
Returns
y: ndarray or scalarReturned array or scalar:
y = +x. This is a scalar if x is a scalar.
Notes
Equivalent to x.copy(), but only defined for types that support arithmetic.
Examples
import numpy as np
✓x1 = np.array(([1., -1.])) np.positive(x1)✓
x1 = np.array(([1., -1.])) +x1✓
Aliases
-
numpy.positive