> ## Documentation Index
> Fetch the complete documentation index at: https://numpyts.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Data Loading & I/O

> Load and save arrays in .npy, .npz, and text formats across Node.js and browser environments.

numpy-ts supports the same binary and text file formats as NumPy. The API is split across two entry points: `numpy-ts/node` for filesystem access, and `numpy-ts` (or `numpy-ts/core`) for in-memory serialization suitable for browsers.

## Loading .npy files

The `.npy` format stores a single array with its dtype, shape, and byte order metadata.

> [!TIP]
>
> In Node.js, you can use `load` and `save` from `numpy-ts/node` for convenient file I/O without manual serialization.

***

## Working with NPZ archives (multiple arrays)

The `.npz` format bundles multiple named arrays into a single ZIP archive.

***

## CSV loading with parseTxt

Load delimited text files (CSV, TSV, etc.) into arrays.

***

## Flexible text loading with genfromtxt

`genfromtxt` is like `parseTxt` but handles missing and irregular data more gracefully.

***

## Extracting data with fromregex

Pull numeric data from unstructured text using regular expressions.

***

## NumPy interoperability

Files saved by numpy-ts can be loaded by Python NumPy, and vice versa. This makes it easy to share data between TypeScript and Python workflows.

> [!WARNING]
>
> numpy-ts only supports numeric dtypes. Object arrays, structured arrays, string arrays, and pickle-based `.npy` files from Python cannot be loaded.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.