News for hackers. Stuff that matters.
Re:NumPy Tricks and Pitfalls by smortaz on Saturday December 23, 2017 @07:54PM (#15997264)
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

Re:NumPy Tricks and Pitfalls by williamstein on Saturday December 23, 2017 @08:25PM (#15997363)
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 by smortaz on Sunday December 24, 2017 @12:25AM (#15998112)
+1 for CoCalc! It's great to see the number of notebook hosting services flourish.
Re:NumPy Tricks and Pitfalls by ehudla on Sunday December 24, 2017 @01:17AM (#15998275)
Anyone know of, or can offer, a comparison of the existing notebook hosting services?
Re:NumPy Tricks and Pitfalls by Woberto on Saturday December 23, 2017 @04:50PM (#15996449)
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 by thijsvandien on Saturday December 23, 2017 @04:55PM (#15996462)
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 by ehudla on Sunday December 24, 2017 @01:20AM (#15998286)
> What books or online courses should I look into to know about memory, flops, and things like that?

What you are after are books/courses on "architecture", I think. A classic book on the subject is Hennessy & Patterson.

https://www.amazon.com/Computer-Architecture-Sixth-Quantitat...

Re:NumPy Tricks and Pitfalls by CardenB on Saturday December 23, 2017 @05:18PM (#15996557)
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 by Waterluvian on Saturday December 23, 2017 @05:34PM (#15996631)
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 by YaxelPerez on Saturday December 23, 2017 @06:02PM (#15996785)
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 by metaobject on Saturday December 23, 2017 @10:39PM (#15997787)
Yeah, but you better define some stopping criteria or else you'll end up with a PhD if you're not careful.
Re:NumPy Tricks and Pitfalls by pasokan on Tuesday December 26, 2017 @07:06AM (#16008246)
Re:NumPy Tricks and Pitfalls by vladf on Tuesday December 26, 2017 @07:44PM (#16012026)
Ah, that's a shame, it looks like that notebook is no longer available. Thanks for pointing it out. I'll remove the reference.
Re:NumPy Tricks and Pitfalls by rebabre on Saturday December 23, 2017 @06:13PM (#15996849)
Whats the funnest thing you guys made with NumPy?
Re:NumPy Tricks and Pitfalls by minimaxir on Saturday December 23, 2017 @06:24PM (#15996907)
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 by okman on Saturday December 23, 2017 @05:59PM (#15996775)
I still don't really understand why someone would choose to use NumPy when the numerical story in Rust is now so good.
Re:NumPy Tricks and Pitfalls by kevmo314 on Saturday December 23, 2017 @06:05PM (#15996808)
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.

Re:NumPy Tricks and Pitfalls by empath75 on Saturday December 23, 2017 @06:15PM (#15996859)
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 by ubernostrum on Saturday December 23, 2017 @06:18PM (#15996876)
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 by marmaduke on Saturday December 23, 2017 @06:30PM (#15996935)
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 by __s on Saturday December 23, 2017 @06:35PM (#15996951)
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 by losteric on Saturday December 23, 2017 @06:04PM (#15996806)
Numpy is great because of all the frameworks built on top. What's the story with Rust?
Re:NumPy Tricks and Pitfalls by Derbasti on Sunday December 24, 2017 @12:39AM (#15998167)
Numerical computation is just one part of scientific code. Linear Algebra, data analysis, modelling, and visualization, are equally important.
Re:NumPy Tricks and Pitfalls by beisner on Saturday December 23, 2017 @06:17PM (#15996873)
TensorFlow doesn’t have a Rust interface.
Re:NumPy Tricks and Pitfalls by seventydwarves on Sunday December 24, 2017 @02:30PM (#16000922)
Isn't this a Rust interface for TensorFlow?

https://github.com/tensorflow/rust

Re:NumPy Tricks and Pitfalls by na85 on Sunday December 24, 2017 @10:21PM (#16002466)
I avoid rust due to the annoying, symbol-heavy syntax that requires too much Shift-key usage.