num-peek

Crates.ionum-peek
lib.rsnum-peek
version0.1.2
created_at2025-09-12 17:33:04.033375+00
updated_at2025-09-12 20:12:27.83291+00
descriptionA CLI tool that can peek into `*.npy` files.
homepagehttps://github.com/peterfication/num-peek
repositoryhttps://github.com/peterfication/num-peek
max_upload_size
id1836007
size51,629
Peter Morgenstern (peterfication)

documentation

README

num-peek

A CLI tool that can peek into *.npy files.

Installation

cargo install num-peek

Usage example

$ num-peek assets/demo.npy
Peek into assets/demo.npy
----------------------------------------
Dimensions: 2
Shape: [2, 3]
Type: Int8
----------------------------------------
Number of unique values: 6
Unique values: [1, 3, 4, 8, 12, 22]
Min value: 1
Max value: 22

Yazi previewer

num-peek can be used together with piper as a Yazi previewer:

# yazi.toml
[plugin]
prepend_previewers = [
  { name = "*.npy", run = 'piper -- num-peek $1' },
]

Development

Prerequisites

  • Rust version >= 1.88.0
  • just task runner

Getting started

just ci
just run
just run-float

Roadmap

  • Limit showing unique values to 10 values
    • If there are more than 10 values, show the smallest 10 and the highest 10
  • Mean, Standard Deviation, Median
  • Different output formats: text, json, ...

License

This project is licensed under the MIT license (LICENSE or opensource.org/licenses/MIT)

Commit count: 64

cargo fmt