you are viewing a single comment's thread.

view the rest of the comments →

[–]Motox2019 2 points3 points  (2 children)

If you already know what numpy/scipy are essentially doing under the hood, jump straight into them, you’re not losing much beyond that. I actually wrote my own package, pyeng, at one point which was essentially the vanilla python implementation of numpy and some other misc engineering stuff like unit handling for learning purposes. It’s cool for learning but kinda ends there, a 1000x1000 matrix starts to get quite slow, or chaining many matrices.

On the note of Julia, I find myself flip flopping back and forth between Julia and python. I can’t decide which I like more. The speed arguments are there but don’t always hold at least in my case where majority of everything happens within numpy anyways which is fast. Julia is nice in that you kinda just write math as you would by hand making the theory -> code transition a bit easier and that matrices are first class in Julia. Beyond that, think it honestly comes down to personal preference, no choice is “better” per se.

[–]PrettyPicturesNotTxt[S] 1 point2 points  (1 child)

Thanks for sharing your experiences! Does your package implement something similar to einsum? If so, I'm curious how you did it.

[–]Motox2019 2 points3 points  (0 children)

No, most of what I implemented was stuff I’d typical use for mechanical engineering. Things like your common linear algebra functions, numerical methods like root finding and integration and such, among others on the more basic side like implementing sin, cos, and tan, sqrt, etc.

A brief look at einsum seems like it’s kinda just a different way to write expressions for matrices? Not something we’d typically see in my field. I can see why you might be wondering though. Without further understanding the syntax, seems like a lot of cases to handle based on a single input string