Metadata-Version: 2.4
Name: matplotlib-torch
Version: 0.1.0
Summary: Autocast PyTorch tensors to numpy/matplotlib-CPU arrays in matplotlib.
Requires-Python: >=3.9
Description-Content-Type: text/markdown
Requires-Dist: matplotlib
Requires-Dist: torch
Provides-Extra: test
Requires-Dist: pytest; extra == "test"

# matplotlib-torch

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

```python
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
