Live data from Hacker News

NumPy Tricks and Pitfalls

nbviewer.jupyter.org

1–10 of 28 posts

Re: NumPy Tricks and Pitfalls

#2
I'm an engineering student that does programming and am wondering, can I ask what are some good resources to gain the appropriate background that would allow me to understand more of this notebook? I have used tools like Numpy but probably not very efficiently without understanding their strengths and weaknesses. What books or online courses should I look into to know about memory, flops, and things like that?

I should probably ask this somewhere else but I'm not sure what the appropriate forum is, if you could point me to where I should that would be great. Thank you!

Re: NumPy Tricks and Pitfalls

#3
post #2

I'm an engineering student that does programming and am wondering, can I ask what are some good resources to gain the appropriate background that would allow me to understand more of this notebook? I have used tools like Numpy but probably not very efficiently without understanding their strengths and weaknesses. What books or online courses should I look into to know about memory, flops, and things like that? I shou…

Here's a great mini-book that explains how NumPy can improve efficiency, at an appropriate level of detail for what you're asking: http://www.labri.fr/perso/nrougier/from-python-to-numpy/

Re: NumPy Tricks and Pitfalls

#4
post #2

I'm an engineering student that does programming and am wondering, can I ask what are some good resources to gain the appropriate background that would allow me to understand more of this notebook? I have used tools like Numpy but probably not very efficiently without understanding their strengths and weaknesses. What books or online courses should I look into to know about memory, flops, and things like that? I shou…

You shouldn’t be afraid to fail, man! Instead of doing something in Matlab, try it in numpy and just do some research to figure out what you want to do.

Eventually you’ll pick up tips from all your online resources, and you’ll realize you could have done some things better the whole time.

Re: NumPy Tricks and Pitfalls

#5
post #4
post #2

I'm an engineering student that does programming and am wondering, can I ask what are some good resources to gain the appropriate background that would allow me to understand more of this notebook? I have used tools like Numpy but probably not very efficiently without understanding their strengths and weaknesses. What books or online courses should I look into to know about memory, flops, and things like that? I shou…

You shouldn’t be afraid to fail, man! Instead of doing something in Matlab, try it in numpy and just do some research to figure out what you want to do. Eventually you’ll pick up tips from all your online resources, and you’ll realize you could have done some things better the whole time.

Yes! There's many ways to learn. One way is essentially the brute force method: Google every Single thing until you get it. That's how I learned Nimoy when doing some basic image analysis.

Re: NumPy Tricks and Pitfalls

#7
post #4

Earlier quoted context omitted.

You shouldn’t be afraid to fail, man! Instead of doing something in Matlab, try it in numpy and just do some research to figure out what you want to do. Eventually you’ll pick up tips from all your online resources, and you’ll realize you could have done some things better the whole time.

Yes! There's many ways to learn. One way is essentially the brute force method: Google every Single thing until you get it. That's how I learned Nimoy when doing some basic image analysis.

I use a depth-first tree traversal to learn a subject. Start at something broad like "physics" and work your way down each sub-topic.

Re: NumPy Tricks and Pitfalls

#9
post #6

I still don't really understand why someone would choose to use NumPy when the numerical story in Rust is now so good.

Perhaps for engineers, but for the rest of the scientific community it's pretty obvious: Rust doesn't have nearly the coverage that NumPy does. A quick check, I couldn't find a GMRES solver in Rust, which is extremely useful for solving large linear systems and hardly an obscure algorithm.

FWIW this is the same situation NumPy was in a while back ago, but instead of boldly asserting that what they had was enough, they looked to other prevalent languages to figure out what was missing and packages like pandas and statsmodels came out.

Post reply on HN