Hacker News new | ask | show | jobs
by pizza 1254 days ago
- einops (probably by far the most useful Python dsl for me as of late, esp. if you deal a lot with tensors)

- numpy __array__ interface standardization (easy compatibility across a lot of numerical libraries, e.g. torch, awkward-array, zarr, jax.numpy, dask, xarray)

- the various jit compilers (e.g. numba, jax.jit, torch.compile)

- hw-accelerated functional programming style (e.g. functorch.vmap)

- pybind11 for easy af bindings to c++

- named dimensions for tensors

- pandas-compatible ecosystem (eg seaborn)

- pytrees

- pyenv

- mamba

What I really need, though, is a realtime successor to matplotlib with a much simpler interface/dsl. Haven't looked into plotly much but probably will try it soonish

4 comments

Matplotlib is really killing me. I never have learned it properly and switch between methods to address the same things in Matplotlib. Every time I have to plot something I have to Google how to do it or I have a template ready already. In my opinion it’s the most annoying library I have to use.
In situations where matplotlib is the lingua franca, like notebooks, I've opted for seaborn. You'll still have to deal with matplotlib's complex nonsense, but substantially less of it.
Altair/Vega ( https://altair-viz.github.io/ ) is really nice to use, although headless rendering outside of a notebook environment is a bit of a pain
I‘m not working inside of notebooks too much to be honest. I was doing so a while back but working in a modular fashion with other scripts is a pain so I went back to vanilla Python files in VS Code a while back. I’ll still take a look, thanks for the heads up!
I had checked out plotly some years ago:

plot.ly now has an API:

https://jugad2.blogspot.com/2013/07/plotly-now-has-api.html

Maybe not practical for your workflow, but making interactive plots in Pluto.jl is so much nicer than hacking around in matplotlib

If it was easier to use virtual environments with PyCall I think I’d abandon matplotlib entirely.

plotnine is an API based on Grammar on Graphics. I use it as an replacement for matplotlib.