Skip to main content



The NPYLoader parses an array from the NPY format, a lightweight encoding of multidimensional arrays used by the Python NumPy library.

File Extension.npy
File TypeBinary
File FormatArray
Data FormatArray
Supported APIsload, parse, parseSync
Decoder TypeSynchronous
Worker Thread SupportYes
Streaming SupportNo


import {_NPYLoader} from '';
import {load} from '';

const {data, header} = await load(url, _NPYLoader);

data is a TypedArray containing the array's data.

header is an object with three keys:

  • descr: a string describing the data type. E.g. |u1 refers to uint8 and <u2 refers to little-endian uint16. Full details are available in the NumPy documentation.
  • fortran_order: a boolean that is true if the array is stored in Fortran order instead of C order.
  • shape: an array of integers that describes the shape of the array. The length of the array corresponds to the number of dimensions of the array.


Currently no options are supported for this loader.