- Fix build failure with Xcode 14 and Ruby 3.1.x.
- Support 32-bit PCG and Mersenne Twister.
require 'numo/random'
# specify the pseudo random number generation algorithm by setting the algorithm argument of constructor.
rng = Numo::Random::Generator.new(algorithm: 'pcg32')
rng = Numo::Random::Generator.new(algorithm: 'pcg64') # default
rng = Numo::Random::Generator.new(algorithm: 'mt32')
rng = Numo::Random::Generator.new(algorithm: 'mt64')
- Add method for random number generation with bernoulli distribution: bernoulli, binomial, negative_binomial, and geometric.
- Change native extension filename.
- Add methods for random number generation with poisson distributions: poisson, exponential, gamma, gumbel, and weibull.
- Change to return array for all methods that fill array with random numbers in Generator class.