Skip to content

Tracing np.add, all the way down

blog.veitheller.de
62 pointsluu5 comments
On HN

Comments

I sort of wish they used c++ for some of the template stuff, especially since the code base already seems to have some C++ iirc. I also contributed a tiny bit in the past, and their C template system was a surprise. (but this is cool and I love numpy anyway lol)

The `.c.src` files with the @arch@ like dispatching logic is specific to numpy. Also, they are currently making efforst to shift to C++ templates using Google's Highway project. I worked on porting `np.negative` to it!

I don't understand, I thought numpy hooked into the fortran stuff :|

numpy is pretty much all C and python. They may dispatch to some Fortran libraries, but I think basically all the internal implementations they have are C. IIRC, scipy does (did?) actually use a lot of fortran fwiw.

That was some lovely spelunking XD

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.