←back to thread

I don't like NumPy

(dynomight.net)
480 points MinimalAction | 1 comments | | HN request time: 0.198s | source
Show context
munchler ◴[] No.43998368[source]
I have to agree with this as someone coming from a strongly-typed background (F#). PyTorch and NumPy are very flexible and powerful, but their API’s are insanely underspecified because every function seems to take multiple combinations of vaguely-typed objects. The library just figures out the right thing to do at runtime using broadcasting or other magic.

This kind of “clever” API seems to be both a benefit and curse of the Python ecosystem in general. It makes getting started very easy, but also makes mastery maddeningly difficult.

replies(2): >>43998959 #>>43999052 #
1. coolcase ◴[] No.43998959[source]
Broadcasting is good, but would be nice if it were explicit.

Maybe it being explicit gets in the way and become inelegant once you get some experience.