5 Jul
2022
5 Jul
'22
7:13 p.m.
Yes, if I am doing this more than once in some code I would make a helper. But it's much better I think to have a common function that people can learn and use consistently instead of having to roll their own functions all the time. Especially because numpy otherwise usually just works when you write the algorithm how you write it on paper. There shouldn't need to be too much thinking involved in the translation. Also yeah using fancy index tricks like `rowmat` and `colmat` simplifies the code a bit, but is still obscure and esoteric looking to somebody who's not intimately familiar with numpy indexing.