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
Sometimes I find a small function missing from Pythran. Implementing it in C++ may be a little bit challenging, but I can often bypass it by copying the source code into my own function.
For example np.fft.fftshift is missing from Pythran, but it is a simple wrapper around np.roll, so simply dropping the definition in my code works:
Would it be possible to have Pythran read from a library of Python code? So, if I use np.fft.fftshift, the first pass would translate to the previous function (vendored in Pythran), and the second pass would generate the C++ code. This makes adding more functions and plugging gaps much easier, since it doesn't require to write C++.
The text was updated successfully, but these errors were encountered:
Sometimes I find a small function missing from Pythran. Implementing it in C++ may be a little bit challenging, but I can often bypass it by copying the source code into my own function.
For example
np.fft.fftshift
is missing from Pythran, but it is a simple wrapper aroundnp.roll
, so simply dropping the definition in my code works:[Caveat]
Would it be possible to have Pythran read from a library of Python code? So, if I use
np.fft.fftshift
, the first pass would translate to the previous function (vendored in Pythran), and the second pass would generate the C++ code. This makes adding more functions and plugging gaps much easier, since it doesn't require to write C++.The text was updated successfully, but these errors were encountered: