←back to thread

I don't like NumPy

(dynomight.net)
481 points MinimalAction | 1 comments | | HN request time: 0.202s | source
Show context
ChrisRackauckas ◴[] No.43998345[source]
One of the reasons why I started using Julia was because the NumPy syntax was so difficult. Going from MATLAB to NumPy I felt like I suddenly became a mediocre programmer, spending less time on math and more time on "performance engineering" of just trying to figure out how to use NumPy right. Then when I went to Julia it made sense to vectorize when it felt good and write a loop when it felt good. Because both are fast, focus on what makes the code easiest to read an understand. This blog post encapsulates exactly that experience and feeling.

Also treating things like `np.linalg.solve` as a black box that is the fastest thing in the world and you could never any better so please mangle code to call it correctly... that's just wrong. There's many reasons to build problem specific linear algebra kernels, and that's something that is inaccessible without going deeper. But that's a different story.

replies(4): >>43998533 #>>43998779 #>>43999127 #>>43999507 #
abdullahkhalids ◴[] No.43999127[source]
The reason is quite simple. Julia is a language designed for scientific computation. Numpy is a library frankenstein-grafted onto a language that isn't really designed for scientific computation.

We can only hope that Julia somehow wins and those of forced to work in python because of network effects can be freed.

replies(4): >>44001532 #>>44003075 #>>44003296 #>>44006465 #
davedx ◴[] No.44003075[source]
This has me wondering, if not that, then what is python designed for?
replies(3): >>44010593 #>>44013165 #>>44021839 #
1. derriz ◴[] No.44021839[source]
Originally a scripting language - from what I recall. An alternative to Perl or Tcl.