Live data from Hacker News

NumPy Tricks and Pitfalls

nbviewer.jupyter.org

11–20 of 28 posts

Re: NumPy Tricks and Pitfalls

#11
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.

As someone who likes rust, python is just easier to code for exploration and the kinds of advantages you get for using rust aren’t particularly relevant.

Re: NumPy Tricks and Pitfalls

#13
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.

The entire surrounding ecosystem. Which includes not just the core numpy/scipy libraries but the stats, modeling, ML, plotting, etc. Plus the wealth of other Python stuff it can integrate with (I work at an almost entirely Python shop -- data science people work in the same language as pipeline and application people, which is really an overlooked thing). Plus the ease of installation and management from Anaconda. Plus the notebook format for easy sharing. Plus... well, lots and lots and lots of things. "We have a fast numerical library" is step one of about ten thousand to achieving parity with what the Python/numpy/scipy ecosystem does.

Re: NumPy Tricks and Pitfalls

#14
post #10

Whats the funnest thing you guys made with NumPy?

Considering the top numeric Python libraries have dependencies on Numpy, including data manipulation (pandas), machine learning (scikit-learn) and deep learning (TensorFlow), you may want to narrow down the question.

Re: NumPy Tricks and Pitfalls

#15
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.

They don’t compete since you could reimplement your compute kernels in Rust and use them directly or as (g)ufuncs with the numpy container, used by the whole science and data stacks (visualization stats etc). Numpy compute APIs are for prototyping or compute which isn’t CPU bottleneck.

So for the majority of numpy users Rust competes with the likes of Numba, Cython, etc, which are hard to beat if you’re already coding in Python.

Re: NumPy Tricks and Pitfalls

#16
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.

https://news.ycombinator.com/item?id=15483267

Every once in awhile /r/rust will get a numerics post & discussion will mostly concede that there's still a ways to go to make this field ergonomic

Re: NumPy Tricks and Pitfalls

#17
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…

[deleted]

Re: NumPy Tricks and Pitfalls

#19
post #18

I uploaded to Azure Notebooks in case anyone wants to run it w/o setting up an environment: https://notebooks.azure.com/smortaz/libraries/advanced-numpy... Click Clone, Sign in, then Run

Similar in CoCalc

https://cocalc.com/share/4a5f0542-5873-4eed-a85c-a18c706e8bc...

Click "Open in CoCalc", then select all, copy.

Re: NumPy Tricks and Pitfalls

#20

Earlier quoted context omitted.

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.

Yeah, but you better define some stopping criteria or else you'll end up with a PhD if you're not careful.
Post reply on HN