log10

Contents

log10#

class brainunit.math.log10(x, unit_to_scale=None, **kwargs)#

Base-10 logarithm, element-wise.

Parameters:
  • x (Array | ndarray | bool | number | bool | int | float | complex | saiunit.Quantity) – Input array or Quantity. Must be positive.

  • unit_to_scale (saiunit.Unit | None) – Unit used to convert x to a dimensionless number first.

Returns:

out – Element-wise base-10 logarithm.

Return type:

Array

Examples

>>> import saiunit as u
>>> import jax.numpy as jnp
>>> u.math.log10(jnp.array([1.0, 10.0, 100.0]))
Array([0., 1., 2.], dtype=float32)