ankit
ankit

Reputation: 13

Why some of Numpy is written in C++?

In https://github.com/numpy/numpy it is found that 2.8% of numpy code is C++. Is it just for interfacing with users' C++ codes (like 0.1% of code which is written in fortran) or is some functionality of numpy built on this code?

And if some functionality of numpy is built on this C++ code, why didn't they use C for those purposes?

Upvotes: 2

Views: 359

Answers (1)

Warren Weckesser
Warren Weckesser

Reputation: 114841

If you click on C++ 2.8%, you'll get a list of files that GitHub has labeled as C++. If you then inspect those files, you'll see that many of them are not, in fact, C++. They are mostly C header files, or files with the .inc extension that are actually C files. So it looks like GitHub has categorized many of these files incorrectly, and the only actual C++ files are SWIG test files.

Upvotes: 2

Related Questions