jax.scipy.special.bernoulli

Contents

jax.scipy.special.bernoulli#

jax.scipy.special.bernoulli(n)[source]#

Generate the Bernoulli numbers \(B_0\) through \(B_n\), inclusive.

JAX implementation of scipy.special.bernoulli().

Parameters:

n (int) – integer, the index of the last Bernoulli number to generate.

Returns:

Array containing the Bernoulli numbers \(B_0\) through \(B_n\), inclusive.

Return type:

Array

Notes

bernoulli generates numbers using the \(B_n^-\) convention, such that \(B_1=-1/2\).