lovely-tensors
❤️ Lovely Tensors
Decision gist · record as of 2026-08-14
Yes. Low install friction, no security issues, permissive license, and active maintenance make it a safe addition. If you work with PyTorch in notebooks or interactive environments, the quality-of-life improvement from readable tensor summaries justifies the minimal dependency footprint. Not essential for production code, but valuable for development and debugging.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Low friction: pure Python wheel with only torch and lovely-numpy as runtime dependencies.
- Active maintenance with recent releases; marked Alpha but in use across top-tier projects.
License · maintenance · safety
MIT (permissive) — MIT license permits unrestricted use, modification, and distribution with minimal attribution requirements.
last release 2026-03-11 (156 days) · last repo commit 2026-04-09 · 1,391 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 75,939 downloads/mo, #14,666 on PyPI
Alternatives
Verify before relying
pip install lovely-tensors
import lovely_tensors as lt
import torch
lt.monkey_patch()
t = torch.randn(3, 196, 196)
print(t) # Now shows: tensor[3, 196, 196] n=115248 x∈[...] μ=... σ=...- Whether monkey-patching persists across notebook restarts or requires re-import in each session
- Performance impact when working with very large tensors (gigabyte scale)
- Compatibility with custom tensor subclasses or third-party PyTorch extensions
What it is and what it does
Lovely Tensors replaces PyTorch's default tensor repr with a compact, human-readable summary that shows shape, element count, memory footprint, value range, mean, standard deviation, and a histogram—all in one line. It detects and flags NaN, Inf, and all-zero tensors, and works with named dimensions and gradient tracking. The package monkey-patches torch.Tensor's display methods so the improved output appears automatically in notebooks and REPLs without changing your code.
It is designed for interactive debugging and exploration, not for production logging. The summary format is stable across tensor operations, making it easy to spot data anomalies during model development. It also provides optional verbose and plain-text modes, and a `.deeper` method to recursively inspect nested tensor structures.
Use it for
- Debugging neural network activations in Jupyter notebooks without scrolling through thousands of raw values
- Quickly spotting NaN or Inf propagation during training by inspecting intermediate tensors
- Verifying tensor shapes and memory usage at a glance during model prototyping
- Inspecting gradient statistics after backpropagation to detect gradient explosion or vanishing
- Exploring multi-dimensional data (e.g., image batches) by recursively drilling into sub-tensors with `.deeper`
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes.
Low install friction, no security issues, permissive license, and active maintenance make it a safe addition. If you work with PyTorch in notebooks or interactive environments, the quality-of-life improvement from readable tensor summaries justifies the minimal dependency footprint. Not essential for production code, but valuable for development and debugging.
Install
lovely-tensors on PyPI
Before you install
Low friction: pure Python wheel with only torch and lovely-numpy as runtime dependencies. Active maintenance with recent releases; marked Alpha but in use across top-tier projects.
License in practice
MIT license permits unrestricted use, modification, and distribution with minimal attribution requirements.
Quickstart
pip install lovely-tensors
import lovely_tensors as lt
import torch
lt.monkey_patch()
t = torch.randn(3, 196, 196)
print(t) # Now shows: tensor[3, 196, 196] n=115248 x∈[...] μ=... σ=...
Verify before relying
- Whether monkey-patching persists across notebook restarts or requires re-import in each session
- Performance impact when working with very large tensors (gigabyte scale)
- Compatibility with custom tensor subclasses or third-party PyTorch extensions
Package facts
| License | MIT permissive |
| Python support | Supports the current Python release >=3.8 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 2 packagestorchlovely-numpy |
| Maintenance | Actively maintained 156 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 75,939 / month, #14,666 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 3 - AlphaIntended Audience :: DevelopersNatural Language :: EnglishProgramming Language :: Python :: 3Programming Language :: Python :: 3 :: Only |
Evidence: lovely_tensors-0.1.22-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “torch tensor debugging”
- lovely-tensorsMonkey-patches PyTorch tensors to display human-readable summaries…
- torchvizGenerates visual diagrams of PyTorch neural network computation…
- torch-einops-utilsProvides utility functions for PyTorch and einops to accelerate…
Give your agent the search over MCP, or paste the wish link into any chat.
More Artificial Intelligence packages
LiteLLM provides a unified Python interface to call 100+ LLM providers (OpenAI, Anthropic, Gemini, Bedrock, Azure, and others) using OpenAI-compatible API format, available as both a Python SDK and a self-hosted AI Gateway proxy server.
Install it if you need to work with multiple LLM providers or want to centralize LLM routing in your organization.
Client library and CLI tool for downloading, uploading, and managing models, datasets, and repositories on the Hugging Face Hub platform.
Install it if you work with Hugging Face Hub models or datasets.
LangChain provides a framework for building agents and LLM-powered applications by composing language models, tools, and memory through a unified API that abstracts over multiple model providers.
hf-xet provides chunk-based deduplication and efficient file transfer for the Hugging Face Hub, enabling faster uploads and downloads of large files with local disk caching.
Tokenizers converts raw text into token sequences for NLP models, with support for training custom vocabularies and using pre-built tokenizers (BPE, WordPiece) optimized for speed via Rust.
Transformers provides a unified framework for loading, fine-tuning, and running state-of-the-art pretrained models across text, vision, audio, video, and multimodal tasks using PyTorch, JAX, or TensorFlow.
Install it if you need to run or train any transformer-based model for NLP, vision, audio, or multimodal tasks.
See also lovely-numpy · torchtyping · einops · pytorch-seed · torchcodec · torch · torchinfo · torch-geometric · torchmetrics · pytorch