You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Documentation on the internal structure of numo-narray is lacking, and I think it would be a hard task to create a C extension. I am not a C professional, so I cannot answer this issue directly. However, I can help a little by writing some helpful information.
Here are three notable people who have created a number of C extensions using numo-narray.I think their code is the best documentation currently available for creating C extensions with numo-narray.
@yoshoku mainly uses numo-narray as a machine learning library, but he has also created a library for reading and exporting images like magro. @ankane has created many famous libraries, and some of his gems use C++ and numo-narray for data processing. @Himeyama has recently uploaded a number of interesting C extension libraries to github that use numo-narray and CUDA.
I think reading their code is a shortcut to building C extensions.
For a more short answer, it is possible to use the numo-narray data structure in your own C extension.
Add the code to look for narray.h in extconf.rb, and then include it in your C source.
#include<numo/narray.h>
There are many ways to write extconf.rb to search narray.h, but ankane's is concise.
Is it possible to use the custom data structure of numo-narray with my own C extension? Or do I have to re-implement some of the code again?
The text was updated successfully, but these errors were encountered: