lovely-numpy
đź’ź Lovely numpy
What it is and what it does
Lovely NumPy wraps NumPy arrays to display concise, human-readable summaries instead of raw output. When you call `lo(array)`, it shows shape, dtype, element count, memory size, value range with a histogram, mean, standard deviation, and flags for NaN or infinity values—all in a single line. For smaller arrays, it still prints the actual values.
The package also provides methods to explore nested structures (`.deeper`), visualize arrays as RGB images (`.rgb` with optional denormalization), display individual channels (`.chans`), and generate matplotlib histograms (`.plt`). It's designed for interactive debugging in Jupyter notebooks and similar environments, reducing the cognitive load of scanning large numerical outputs.
Use it for:
- Inspect tensor shapes and statistics during model training or data preprocessing without scrolling through raw arrays.
- Quickly spot NaN, infinity, or all-zero arrays that indicate bugs in numerical computations.
- Visualize image-like arrays as RGB or channel views to verify data normalization and transformations.
- Explore multi-dimensional nested structures layer-by-layer to understand data organization.
- Generate and save matplotlib plots of array distributions for documentation or reports.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Provides a human-readable summary of NumPy arrays with shape, dtype, statistics, and special values, plus visualization methods for debugging and exploration.
Yes. Low install friction, active maintenance, MIT license, and no known vulnerabilities make it a safe addition. It directly solves a real debugging pain point—making NumPy array inspection practical in notebooks—and the visualization features add value for data exploration. Useful for anyone working with NumPy in interactive environments.
Install
lovely-numpy on PyPI
pip
pip install lovely-numpyuv
uv add lovely-numpypoetry
poetry add lovely-numpyInstalling lovely-numpy
Before you install
Low install friction with three common dependencies (numpy, fastcore, matplotlib). Active maintenance with a recent release and no known vulnerabilities.
License in practice
MIT license permits unrestricted use, modification, and distribution in both open and closed projects.
Quickstart
pip install lovely-numpy
import numpy as np
from lovely_numpy import lo
arr = np.random.randn(100, 100)
lo(arr)
Verify before relying
- Whether the package works with NumPy versions beyond the current ecosystem (specific version constraints not stated in fact sheet).
- Performance characteristics when inspecting very large arrays or nested structures.
Package facts
| License | MIT (permissive) |
| Python support | supports the current Python release (>=3.8) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 3 — numpy, fastcore, matplotlib |
| Maintenance | actively maintained — 91 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 98,246/month — #13,098 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: lovely_numpy-0.2.24-py3-none-any.whl
Keywords: jupyter, numpy, visualisation
Tags
More Scientific/Engineering packages
NumPy provides an N-dimensional array object…
permissive · top 100 on PyPI
pandaspandas provides fast, flexible data structures…
permissive · top 100 on PyPI
scipyscipy provides numerical algorithms for…
permissive · top 100 on PyPI
scikit-learnscikit-learn provides a comprehensive Python…
permissive · top 1,000 on PyPI
dilldill extends Python's pickle module to…
permissive · top 1,000 on PyPI
multiprocessMultiprocess is an enhanced fork of Python's…
permissive · top 1,000 on PyPI
lovely-tensorsMonkey-patches PyTorch tensors to display…
permissive · top 15,000 on PyPI
numpy-groupiesProvides optimized group-indexing operations on…
permissive · top 15,000 on PyPI
pprintpppprintpp is a drop-in replacement for Python's…
permissive · top 5,000 on PyPI
nptypingProvides type hints and runtime type checking…
permissive · top 15,000 on PyPI
lovelyplotsLovelyPlots provides matplotlib style sheets…
permissive · top 15,000 on PyPI
DataPropertyExtracts and classifies properties from…
permissive · top 5,000 on PyPI
ml-dtypesml_dtypes provides NumPy-compatible data types…
permissive · top 1,000 on PyPI
snuggsSnuggs evaluates s-expressions (Lisp-like…
permissive · top 15,000 on PyPI
numpydanticNumpydantic adds type annotations and…
permissive · top 15,000 on PyPI
statisticsProvides basic mathematical statistics…
permissive · top 15,000 on PyPI