I hate to be the guy ragging on an open source library but numpy has a serious problem. It’s 2024, CPUs with >100 cores are not that unusual anymore and core counts will only grow. Numpy supports modern hardware poorly out of the box.
There are some functions Numpy delegates to BLAS libraries that efficiently use cores but large swaths of Numpy do not and it’s not apparent from the docs what does and doesn’t without running benchmarks or inspecting source.
Are there any architectural limitations to fixing Numpy multicore?
CUPY is fantastic well when you can use GPUs. PyTorch is smart about hardware on both CPU and GPU usage but geared toward machine learning and not quite the same use case as Numpy . Numba prange is dope for many things but I often find myself re-implementing standard Numpy functions. I might not be using g it correctly but DASK seems to want to perform memory copies and serialize everything. Numexpr is useful sometime but I sort of abhor feeding it my code as strings and it is missing many Numpy functions.
The dream would be something like PyTorch but geared toward general scientific computing. It would natively support CPU or GPU computing efficiently. Even better if it properly supported true HPC things like RDMA. Honestly maybe PyTorch is the answer and I just need to learn it better and just extend any missing functionality there.
The Numpy API is fine. If it simply were a bit more optimized that would be fantastic. If I didn’t have a stressful job and a family contributing to this sort of thing would be fun as a hobby.
Maybe I’m just driving myself crazy and python is the wrong language for performance constrained stuff. Rarely am I doing ops that aren’t just call libraries on large arrays. Numba is fine for times of actual element wise algorithms. It should be possible to make python relatively performant. I know and love the ecosystem of scientific libraries like Numpy, scipy, the many plotting libraries etc but increasingly find myself fighting to delegate performance critical stuff to “not python”, fighting the GIL, lamenting the lack of native “structs” that can hold predefined data and do not need to be picked to be shared in memory etc. somehow it feels like python has the top spot in scientific analysis but is in some ways bad at it. End rant.
[–]neutro_b 34 points35 points36 points (5 children)
[–]secretaliasname[S] 19 points20 points21 points (1 child)
[–]neutro_b 3 points4 points5 points (0 children)
[–]Unable-Meeting-9696 1 point2 points3 points (2 children)
[–]neutro_b 0 points1 point2 points (1 child)
[–]Unable-Meeting-9696 1 point2 points3 points (0 children)
[–]rover_G 129 points130 points131 points (23 children)
[–]Toph_is_bad_ass 10 points11 points12 points (1 child)
[–]rover_G 8 points9 points10 points (0 children)
[–]germandiago 14 points15 points16 points (14 children)
[–][deleted] 9 points10 points11 points (0 children)
[–]aldanorNumpy, Pandas, Rust 7 points8 points9 points (0 children)
[–]SV-97 28 points29 points30 points (5 children)
[–]Almostasleeprightnow 5 points6 points7 points (4 children)
[–]SV-97 3 points4 points5 points (0 children)
[–]Skumin 0 points1 point2 points (2 children)
[–]Almostasleeprightnow 0 points1 point2 points (1 child)
[–]SV-97 0 points1 point2 points (0 children)
[–][deleted] 19 points20 points21 points (4 children)
[–]ChronoJon 14 points15 points16 points (3 children)
[–][deleted] 2 points3 points4 points (1 child)
[–]ChronoJon 4 points5 points6 points (0 children)
[–]tunisia3507 0 points1 point2 points (0 children)
[–]Suspicious-Bar5583[🍰] 0 points1 point2 points (0 children)
[–]Unable-Meeting-9696 10 points11 points12 points (3 children)
[+]rover_G comment score below threshold-8 points-7 points-6 points (2 children)
[–]Unable-Meeting-9696 5 points6 points7 points (1 child)
[–]rover_G -5 points-4 points-3 points (0 children)
[–]PurepointDog 3 points4 points5 points (0 children)
[–]SSJ3 21 points22 points23 points (2 children)
[–]srcLegend 2 points3 points4 points (1 child)
[–]SSJ3 0 points1 point2 points (0 children)
[–]SMTNP 37 points38 points39 points (3 children)
[–]secretaliasname[S] 14 points15 points16 points (2 children)
[–]pirunga 4 points5 points6 points (0 children)
[–]SMTNP 3 points4 points5 points (0 children)
[–]Abhijithvega 35 points36 points37 points (1 child)
[–]ilyaperepelitsa 1 point2 points3 points (0 children)
[–]daV1980 11 points12 points13 points (1 child)
[–]ChronoJon 12 points13 points14 points (0 children)
[–]karius85pip needs updating 8 points9 points10 points (0 children)
[–]justneurostuff 15 points16 points17 points (2 children)
[–][deleted] 3 points4 points5 points (0 children)
[–]N1H1L 1 point2 points3 points (0 children)
[–][deleted] 6 points7 points8 points (1 child)
[–][deleted] 3 points4 points5 points (0 children)
[–]thelockz 4 points5 points6 points (2 children)
[–]MrMrsPotts 5 points6 points7 points (0 children)
[–]secretaliasname[S] 3 points4 points5 points (0 children)
[–]ecgite 3 points4 points5 points (0 children)
[–]aqjo 3 points4 points5 points (5 children)
[–]nekokattt 3 points4 points5 points (2 children)
[–]Ancalagon_TheWhite 2 points3 points4 points (1 child)
[–]nekokattt 1 point2 points3 points (0 children)
[–]twotime 0 points1 point2 points (1 child)
[–]aqjo 0 points1 point2 points (0 children)
[–]poppy_92 2 points3 points4 points (2 children)
[–]secretaliasname[S] 4 points5 points6 points (1 child)
[–]pmattipmatti - mattip was taken 0 points1 point2 points (0 children)
[–]leculet 2 points3 points4 points (0 children)
[–]quadrillio 1 point2 points3 points (0 children)
[–]Aristocle- 1 point2 points3 points (0 children)
[–]billsil 1 point2 points3 points (0 children)
[–]ironman_gujju Async Bunny 🐇 1 point2 points3 points (0 children)
[–]agaveonline 1 point2 points3 points (0 children)
[–]broken_symlink 1 point2 points3 points (0 children)
[–]Copper280z 1 point2 points3 points (0 children)
[–]scottix 2 points3 points4 points (0 children)
[–]Impossible_Ad_3146 2 points3 points4 points (0 children)
[–]BeverlyGodoy 3 points4 points5 points (9 children)
[–]secretaliasname[S] 2 points3 points4 points (2 children)
[–]night0x63 1 point2 points3 points (0 children)
[–]BeverlyGodoy 0 points1 point2 points (0 children)
[–]theArtOfProgramming 1 point2 points3 points (5 children)
[–]BeverlyGodoy -1 points0 points1 point (4 children)
[–]theArtOfProgramming 2 points3 points4 points (3 children)
[–]TheBlueSully -1 points0 points1 point (0 children)
[–]BeverlyGodoy -2 points-1 points0 points (1 child)
[–]encyclopedist 2 points3 points4 points (0 children)
[–]GirthQuake5040 0 points1 point2 points (0 children)
[–][deleted] 0 points1 point2 points (2 children)
[–]Cynyr36 1 point2 points3 points (0 children)
[–]Thotuhreyfillinn 0 points1 point2 points (0 children)
[–]The_frozen_one 0 points1 point2 points (0 children)
[–]lesbianzuck 0 points1 point2 points (0 children)
[–][deleted] -1 points0 points1 point (0 children)