To find the n
th root of number or array x
in numpy use:
np.power(x, (1/n))
n
can be a natural number like 4
but it can also be a floating point number like 3.26
.
Example: Compute the 78th root of 1.234
>>> import numpy as np >>> np.power(1.234, (1/78)) 1.0026992894299456