MCPcopy Create free account
hub / github.com/numpy/numpy / log1p

Function log1p

numpy/array_api/_elementwise_functions.py:464–472  ·  view source on GitHub ↗

Array API compatible wrapper for :py:func:`np.log1p `. See its docstring for more information.

(x: Array, /)

Source from the content-addressed store, hash-verified

462
463
464def log1p(x: Array, /) -> Array:
465 """
466 Array API compatible wrapper for :py:func:`np.log1p <numpy.log1p>`.
467
468 See its docstring for more information.
469 """
470 if x.dtype not in _floating_dtypes:
471 raise TypeError("Only floating-point dtypes are allowed in log1p")
472 return Array._new(np.log1p(x._array))
473
474
475def log2(x: Array, /) -> Array:

Callers 1

npy_log1pFunction · 0.85

Calls 1

_newMethod · 0.80

Tested by

no test coverage detected