MPoL-dev / MPoL

A flexible Python platform for Regularized Maximum Likelihood imaging
https://mpol-dev.github.io/MPoL/
MIT License
33 stars 11 forks source link

Simplify matplotlib plotting #253

Open iancze opened 8 months ago

iancze commented 8 months ago

I discovered by accident that a recent version of PyTorch implemented the ndim attribute, making it possible to use matplotlib routines to plot PyTorch tensors directly. I would suspect this works only if tensors are on the CPU, but I haven't checked.

We should figure out which torch version implemented this, bump to that as a minimum, and then simplify our plotting routines. I suspect we could remove many torch2npy calls and just plot tensors directly.