(sorry for the double posting, if any)
Dear pythraners and pythonistae (the latin plural for pythonista?)
It is my pleasure to announce the release of Pythran 0.7.2, now
available on
- pypy: https://pypi.python.org/pypi/pythran
- conda: https://anaconda.org/serge-sans-paille/pythran
- github: https://github.com/serge-sans-paille/pythran
Pythran is an ahead-of-time Python compiler with a focus on high-level
scientific computing. It relies on a few non-intrusive annotations to
provide (potentially) vectorized, parallel version of high level Python
code, like the following, borrowed from stackoverflow [0];
#pythran export GrayScott(int, float, float, float, float)
# ^ see the non intrusive, backward compatible annotation ^
import numpy as np
def GrayScott(counts, Du, Dv, F, k):
n = 300
U = np.zeros((n+2,n+2), dtype=np.float32)
V = np.zeros((n+2,n+2), dtype=np.float32)
u, v = U[1:-1,1:-1], V[1:-1,1:-1]
r = 20
u[:] = 1.0
U[n/2-r:n/2+r,n/2-r:n/2+r] = 0.50
V[n/2-r:n/2+r,n/2-r:n/2+r] = 0.25
u += 0.15*np.random.random((n,n))
v += 0.15*np.random.random((n,n))
for i in range(counts):
Lu = ( U[0:-2,1:-1] +
U[1:-1,0:-2] - 4*U[1:-1,1:-1] + U[1:-1,2:] +
U[2: ,1:-1] )
Lv = ( V[0:-2,1:-1] +
V[1:-1,0:-2] - 4*V[1:-1,1:-1] + V[1:-1,2:] +
V[2: ,1:-1] )
uvv = u*v*v
u += Du*Lu - uvv + F*(1 - u)
v += Dv*Lv + uvv - (F + k)*v
return V
This minor yet amazing version brings in more numpy function support
[1], easier install, a conda build, tentative windows support, faster
compilation time and generates generally faster native modules.
Kudos to Pierrick for the hardwork and to all the bug reporters. You all
help a lot to bring the motivation high.
Special thanks to the OpenDreamKit[2] project for the financial support.
Most of the new features have been implemented thanks to this funding!
Changelog extract:
2015-10-13 Serge Guelton
participants (1)
-
serge guelton