|
|
俊秀的凳子 · 亚洲快餐“大王”:祖籍福建晋江,在全球开出超 ...· 2 年前 · |
|
|
俊秀的凳子 · 吃凉拌菜能减肥?4大饮食新误区--健康·生活 ...· 2 年前 · |
|
|
俊秀的凳子 · 盘点饮食减肥常见的4个误区 ...· 2 年前 · |
|
|
俊秀的凳子 · 营养科普知识_丰都县人民政府· 2 年前 · |
|
|
俊秀的凳子 · 营养误区大揭秘| ...· 2 年前 · |
Resources, guides, and references
shard_map
jax.checkpoint
(aka
jax.remat
)
checkify
transformation
set_xla_metadata
Ref
: mutable arrays for data plumbing and memory control
jax.checkpoint
(
jax.remat
)
jax.numpy
module
jax.scipy
module
jax.lax
module
jax.random
module
jax.sharding
module
jax.ad_checkpoint
module
jax.debug
module
jax.dlpack
module
jax.distributed
module
jax.dtypes
module
jax.ffi
module
jax.flatten_util
module
jax.image
module
jax.nn
module
jax.nn.initializers
module
jax.ops
module
jax.profiler
module
jax.ref
module
jax.stages
module
jax.test_util
module
jax.tree
module
jax.tree_util
module
jax.typing
module
jax.export
module
jax.extend
module
jax.extend.backend
module
jax.extend.core
module
jax.extend.linear_util
module
jax.extend.lowering
module
jax.extend.mlir
module
jax.extend.pallas
module
jax.extend.random
module
jax.extend.xla
module
jax.example_libraries
module
jax.example_libraries.optimizers
module
jax.example_libraries.stax
module
jax.experimental
module
jax.experimental.checkify
module
jax.experimental.compilation_cache
module
jax.experimental.custom_partitioning
module
jax.experimental.jet
module
jax.experimental.key_reuse
module
jax.experimental.mesh_utils
module
jax.experimental.multihost_utils
module
jax.experimental.pallas
module
jax.experimental.random
module
jax.experimental.serialize_executable
module
jax.experimental.sparse
module
The gamma function.
JAX implementation of
scipy.special.gamma
.
The gamma function is defined for \(\Re(z)>0\) as
\[\mathrm{gamma}(z) = \Gamma(z) = \int_0^\infty t^{z-1}e^{-t}\mathrm{d}t\]
and is extended by analytic continuation to arbitrary complex values
z
.
For positive integers
n
, the gamma function is related to the
factorial()
function via the following identity:
For real inputs:
if \(x = -\infty\) , NaN is returned.
if \(x = \pm 0\) , \(\pm \infty\) is returned.
if \(x\) is a negative integer, NaN is returned. The sign of gamma at a negative integer depends on from which side the pole is approached.
if \(x = \infty\) , \(\infty\) is returned.
if \(x\) is NaN, NaN is returned.
For complex inputs:
at non-positive integers (poles),
nan+nanj
is returned, matching SciPy.
if either real or imaginary component is NaN,
nan+nanj
is returned.
x ( ArrayLike ) – arraylike, real or complex valued. Complex inputs use a Lanczos approximation with reflection formula.
array containing the values of the gamma function. For complex inputs, the output is complex-valued.
See also
jax.scipy.special.factorial()
: the factorial function.
jax.scipy.special.gammaln()
: the natural log of the gamma function
jax.scipy.special.gammasgn()
: the sign of the gamma function
Notes
For complex inputs, the implementation uses the Lanczos approximation (g=7, N=9 coefficients) with the reflection formula for Re(z) < 0.5.