skillfed

lovely-numpy

đź’ź Lovely numpy

lovely-numpy v0.2.24 98.2K downloads/30d#13,098 on PyPI76
Permissive license MIT Active released

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-numpy

uv

uv add lovely-numpy

poetry

poetry add lovely-numpy

Installing 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

Development Status :: 3 - AlphaIntended Audience :: DevelopersNatural Language :: EnglishProgramming Language :: Python :: 3Programming Language :: Python :: 3 :: Only

Tags

numpy array inspectiondebug numpy arraysarray statistics summaryvisualize numpy dataarray shape and stats
jupyter-friendlyarray-debuggingdata-visualization

More Scientific/Engineering packages