Anyhow, the * operator does not work with sparse matrices, and you really don't want to maintain two versions of your formulas. Thus, you are unfortunately stuck with @ or .dot
I guess there might be a much more math-friendly library than numpy, but I have never found it.
> hmmm, I thought the matrix class was deprecated? At least it says so in the official numpy documentation:
Huh, you're right. Bummer, I hadn't noticed that yet. I agree that an ergonomic matrix class is sorely missing in the Python ecosystem. It shouldn't even be that hard to implement, since all the plumbing is already there.
If you use the numpy.matrix type instead of numpy.array, the * operator becomes matrix multiplicaton.