Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python.announce > #2878
| From | Serge Guelton <serge.guelton@telecom-bretagne.eu> |
|---|---|
| Newsgroups | comp.lang.python.announce |
| Subject | Pythran - 0.8.6 |
| Date | 2018-06-07 14:01 +0200 |
| Message-ID | <mailman.28.1528373765.22129.python-announce-list@python.org> (permalink) |
| References | <20180607120120.GA9284@lakota> |
Hi there,
Pythran just released its 0.8.6 version. A quick reminder: Pythran is a
compiler for scientific Python, it can be used to turn Python kernels
as:
#pythran export _brief_loop(float64[:,:], uint8[:,:], intp[:,:], int[:,:], int[:,:])
def _brief_loop(image, descriptors, keypoints, pos0, pos1):
for k in range(len(keypoints)):
kr, kc = keypoints[k]
for p in range(len(pos0)):
pr0, pc0 = pos0[p]
pr1, pc1 = pos1[p]
descriptors[k,p] = image[kr + pr0, kc + pc0] < image[kr + pr1, kc + pc1]
In a native library that runs much faster.
It's available on pypi: https://pypi.org/project/pythran/
on conda-forge (linux and osx): https://anaconda.org/conda-forge/pythran
and on github: https://github.com/serge-sans-paille/pythran
As a fun fact, Pythran is now used as a mean to turn Python code into
pure native library used in C++ code base, without Python involved. Some
people even use SWIG to turn this code into native libraries called
from... Java through JNI :-)
Enjoy,
Serge
Back to comp.lang.python.announce | Previous | Next | Find similar | Unroll thread
Pythran - 0.8.6 Serge Guelton <serge.guelton@telecom-bretagne.eu> - 2018-06-07 14:01 +0200
csiph-web