Skip to main content

matplotlib-torch

Transparently pass PyTorch tensors (CPU, CUDA, MPS, with/without grad) to matplotlib. Avoid .detach().cpu().numpy() boilerplate.

import matplotlib_torch
matplotlib_torch.activate()

import matplotlib.pyplot as plt
import torch

plt.plot(torch.tensor([1., 2., 3.], device='cuda'))   # just works

Install

pip install matplotlib-torch

Metadata

Release files for matplotlib-torch 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for matplotlib-torch 0.1.0
File Size Uploaded
matplotlib_torch-0.1.0.tar.gz 2.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for matplotlib-torch 0.1.0
File Interpreter ABI Platform
matplotlib_torch-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 5.2 kB

Release files / matplotlib_torch-0.1.0.tar.gz

Download URL matplotlib_torch-0.1.0.tar.gz
Size 2.8 kB
Tags Source
SHA-256 checksum
How to use checksums
2cde4e4eb6f9e2feda440b96683a783d7a47182504d1a2f14c4def5365d79974
BLAKE2b-256 checksum
How to use checksums
2b0005270ec7f8ac72ed56add0998abb6da27df4791a0033eb84049b80e8b16f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.1

Release files / matplotlib_torch-0.1.0-py3-none-any.whl

Download URL matplotlib_torch-0.1.0-py3-none-any.whl
Size 2.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
600fb7f6fee92f7075508992e466ae9a0799a3a7c84927c74fb53dd2ba07442d
BLAKE2b-256 checksum
How to use checksums
2dc1cb53811621cf706748bcbd0937831716744ce61aa9fca71eb3d2d60944d9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.1

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page