brainunit.math.hypot#
- brainunit.math.hypot(x, y, unit_to_scale=None, **kwargs)#
Given the legs of a right triangle, return its hypotenuse.
Computes
sqrt(x**2 + y**2)element-wise.- Parameters:
- Returns:
out – Hypotenuse values. If
xandyare Quantities with the same dimension (andunit_to_scaleis not given), the result is a Quantity in the unit ofx.- Return type:
Array|Quantity
Examples
>>> import saiunit as u >>> import jax.numpy as jnp >>> u.math.hypot(jnp.array([3.0]), jnp.array([4.0])) Array([5.], dtype=float32)