There is a newer version of the record available.

Published June 4, 2026 | Version v0.1.0

sequince-dev/orng: v0.1.0

  • 1. University of Portsmouth

Description

orng v0.1.0

First stable release of orng, a unified, cross-backend random number generator built on the Array API standard.

It mirrors a subset of the numpy.random.Generator API:

  • random
  • uniform
  • normal
  • choice
  • gamma

letting you pick the underlying backend at runtime. The following backends are currently supported:

  • numpy
  • torch
  • cupy
  • jax

Installation

orng can be installed from PyPI using pip:

pip install orng

Quickstart

from orng import RandomGenerator

rng = RandomGenerator(backend="numpy", seed=42)
samples = rng.normal(loc=0.0, scale=1.0, size=5)

Fucntional API

orng also provides a functional API compatible with jax JIT compilation. See the documentation for more details.

Files

sequince-dev/orng-v0.1.0.zip

Files (27.2 kB)

Name Size Download all
md5:0948795ed1d3a9f2d7a5eb8fd5bbb432
27.2 kB Preview Download

Additional details

Related works

Software