# rogersce/cnpy

library to read/write .npy and .npz files in C/C++

Repository: https://github.com/rogersce/cnpy
Canonical: https://ross.abutalabs.com/products/cnpy
Language: C++
License: MIT
License Family: permissive
Last push: 2023-01-18T14:16:29+00:00

## Health v2 (maintenance only)
Score: 32/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 0, release rhythm 35, longevity 100
- inputs: {"age_days": 5564, "days_push": 1323, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: no_releases
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1489, forks 337 (observed 2026-08-28T04:04:52.240536+00:00)

## What it is
A small C++ library for reading and writing NumPy .npy and .npz binary array files. It enables fast binary data exchange between C++ scientific code and Python/NumPy workflows.

## Use cases
- save large C++ arrays as .npy files for analysis in Python
- load NumPy .npy arrays into C++ programs
- read specific variables from .npz archives in C++
- exchange multi-dimensional scientific data between C++ and Python
- write binary array data with shape and dtype metadata

## When to choose
- you need C++/Python NumPy data interchange with minimal dependencies
- you want fast low-level binary I/O for large arrays
- you need a lightweight header-plus-library solution with CMake build

## When to avoid
- you need full NumPy API features like memory-mapped or compressed arrays
- you work primarily in Python or another language with native NumPy support
- you need actively developed features or broad format support beyond npy/npz

## Facets
- artifact type: library
- maturity: maintenance
- function: serialization, file-system
- domain: data-science, files, developer-tools
- platform: cpp, windows, cross-platform
- tags: numpy, npy, npz, scientific-computing, interoperability, linux, macos

## Member repositories
- rogersce/cnpy (main) score 32

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:04:52.240536+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T04:33:41.894145+00:00, confidence not recorded.
  - readme: https://github.com/rogersce/cnpy (fetched 2026-08-28T04:04:52.240536+00:00, sha 37b385c333ff)
- Data as of 2026-08-30T08:39:29.467469+00:00.
