randarium
Arrays

N-Dimensional Array Generator

Create nested numeric arrays for testing tensor and data-processing code.

Also known as: multidimensional array · tensor data

seeded

Output

No output yet — set your options and hit .
About this tool, tips & examples

What it does

The N-Dimensional Array Generator produces nested numeric arrays of any practical shape — enter dimensions like 3,4,5 and get a 3×4×5 tensor of values drawn from your min/max range at chosen precision. Seeded output regenerates identically, and JSON export drops straight into NumPy, TensorFlow, or JavaScript test code.

Common use cases

  • Tensor fixtures — known-shape inputs for testing ML preprocessing, reshaping, and broadcasting logic.
  • API testing — nested-array payloads for endpoints that accept multidimensional data.
  • Data-science teaching — concrete examples of shapes, axes, and ranks that students can inspect by eye.
  • Serialization tests — deeply nested numeric structures for JSON parsers and schema validators.

Settings

  • Dimensions — comma-separated sizes, e.g. 10 (vector), 3,3 (matrix), 2,4,8 (3-D tensor).
  • Minimum / Maximum — the value range.
  • Decimal places — 0 to 10; zero yields integer tensors.
  • Seed — identical seed + settings = identical tensor, so numeric tests can assert exact values.

Privacy note

Arrays are computed locally in your browser and never uploaded. Values are uniform random draws — synthetic numbers with no meaning beyond your test.

FAQ

How do I load the output into NumPy? Export JSON and np.array(json.load(f)) — the nested lists convert directly, with the shape you specified.

Is there a size limit? Total element count is what matters: 100×100×100 is a million values. Keep test fixtures small enough to diff; generate big tensors only for performance runs.

Just need 2-D or 1-D? The Random Matrix generator does rectangular matrices with CSV export; Numeric Series covers single sequences with more distribution options.