-
-
Notifications
You must be signed in to change notification settings - Fork 9.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ENH: Create an interface from lower level C-API to C++ with same APIs as NumPy #26422
Comments
TL;DR: I think it is a lot of work for little pay-off to be honest and while I might be convinced if someone dedicated a lot of time on it, I don't think NumPy should prioritize it. A few points:
Maybe, I am not convinced it would help you much. I might consider explicit C++ API for some parts of NumPy, but that won't be what you are looking for at all. I realize that it can work well for projects to do this dance, but I think the projects that do it, do it because they need to expose C/C++ and Python in a single project/team. Doing this NumPy would be a ton of work/reorganization and in the end it may just be a worse eigen (or whichever). There is recurring talk about sharing some of the lowest core implementation but of course many are already "shared" (matrix operations are blas/lapack, fft is not NumPy's really, etc.). |
@Qjbtiger: xtensor and xtensor-python might provide what you are looking for. |
Proposed new feature or change:
Hi!
Recently, I have been diving into a C++ project which needs some matrix operations. Although some matrix libraries like Eigen, are really excellent, I have to spend extra time to get familiar with the grammar of new libraries. Other libraries like NumCpp, which has the same APIs as NumPy, seem to perform less efficiently than NumPy (I know NumPy did many optimizations for matrix operations).
As NumPy is based on lower-level C-API, I am wondering whether it is possible to build an interface from lower-level C-API to C++ API (exposed to users, same APIs as NumPy). Note that it is just an interface from C to C++ and we don't need to implement specific low-level operations.
The text was updated successfully, but these errors were encountered: