bundles / numpy latest / numpy / lib / scimath / logn
_ArrayFunctionDispatcher
numpy.lib.scimath:logn
source: build-install/usr/lib/python3.14/site-packages/numpy/lib/_scimath_impl.py :347
Signature
def logn ( n , x ) Summary
Take log base n of x.
Extended Summary
If x contains negative inputs, the answer is computed and returned in the complex domain.
Parameters
n: array_likeThe integer base(s) in which the log is taken.
x: array_likeThe value(s) whose log base
nis (are) required.
Returns
out: ndarray or scalarThe log base
nof thexvalue(s). Ifxwas a scalar, so is out, otherwise an array is returned.
Examples
import numpy as np np.set_printoptions(precision=4)✓
np.emath.logn(2, [4, 8]) np.emath.logn(2, [-4, -8, 8])✓
Aliases
-
numpy.emath.logn