Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python.announce > #2828 > unrolled thread
| Started by | Serge Guelton <serge.guelton@telecom-bretagne.eu> |
|---|---|
| First post | 2018-04-24 09:09 +0200 |
| Last post | 2018-04-24 09:09 +0200 |
| Articles | 1 — 1 participant |
Back to article view | Back to comp.lang.python.announce
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Pythran 0.8.5 Serge Guelton <serge.guelton@telecom-bretagne.eu> - 2018-04-24 09:09 +0200
| From | Serge Guelton <serge.guelton@telecom-bretagne.eu> |
|---|---|
| Date | 2018-04-24 09:09 +0200 |
| Subject | Pythran 0.8.5 |
| Message-ID | <mailman.45.1524659217.2832.python-announce-list@python.org> |
(sorry for the double posting if any)
It is my pleasure to announce a new version of the Pythran compiler.
Pythran is an Ahead of Time compiler for a subset of the Python
language, with a focus on scientific kernels.
It can turn code like the one below:
#pythran export weights(uint8[:,:])
import numpy as np
def weights(input_data, threshold=0.3):
n_seq, length = input_data.shape
weights = np.zeros(n_seq, dtype=np.float32)
for i in range(n_seq):
vector = input_data[i, None, :]
count_matches = np.sum(vector == input_data, axis=1)
over_threshold = count_matches > (threshold * length)
total = np.sum(over_threshold)
weights[i] = 1 / total
return weights
into a native module that runs roughly 10 times faster than when
interpreted by cpython.
It's available on PyPi, Conda and GitHub under BSD license.
For the curious reader, the Changelog is reproduced below.
It's a megablast!
----
2018-04-23 Serge Guelton <serge.guelton@telecom-bretagne.eu>
- numpy.fft support (thanks to Jean Laroche)
- Faster generalized expression
- Faster numpy.transpose, numpy.argmax, numpy reduction
- Sphinx-compatible generated docstring (thanks to Pierre Augier)
- Python output through -P (thanks to Pierre Augier)
- Many bugfixes and numpy improvements (thanks to Yann Diorecet and Jean Laroche)
Back to top | Article view | comp.lang.python.announce
csiph-web