[pythran] 2 simple questions

  • From: PIERRE AUGIER <pierre.augier@xxxxxxxxxxxxxxx>
  • To: pythran@xxxxxxxxxxxxx
  • Date: Wed, 2 Dec 2015 11:04:28 +0100 (CET)

Hello,

After having played with Pythran to test and bench it, I am considering using
it in a research code that now uses Cython for most of the heavy numerical
computations. Before I really start to use Pythran in my real life application,
I have some issues that I need to solve. Before going to the technical issues,
I start with two very simple but still annoying ones:

- I do not know how to import and call the not pythranized python functions
once the .so has been produced (for tests and benchmarks). Of course, it is
possible to copy the Python file with another name but it would not be clean in
a project with many pythran extensions. Is there already a simple way to do
that? Would it be possible to do something like this :

import mymod
myfunc_pythran = mymod.myfunc
myfunc_python = mymod.__notpythranized__.myfunc

- Some pythran definitions for functions with many parameters are much longer
than 79 characters.

#pythran export my_function_with_long_name(complex128[][][],
complex128[][][], complex128[][], complex128[][], float[][], float[][], int,
int)

Since all the Python code is on 79-character lines, it seems to me that it is
sometimes not very nice and clear. Would it be possible to make Pythran
understand something like this?

#pythran export my_function_with_long_name(
#pythran complex128[][][], complex128[][][], complex128[][],
#pythran complex128[][], float[][], float[][], int, int)

Thank you for the very nice work on Pythran!
Pierre

--
Pierre Augier - CR2 CNRS http://www.legi.grenoble-inp.fr
LEGI (UMR 5519) Laboratoire des Ecoulements Geophysiques et Industriels
BP53, 38041 Grenoble Cedex, France tel:+33.4.56.52.86.16


Other related posts: