Skip to content

Instantly share code, notes, and snippets.

@paugier
paugier / pyni-pep-paugier-draft.md
Last active September 25, 2025 15:05
pyni-pep-draft

PEP 9999: A vision for Python's C API

This document is a tentative improvement (in particular adding an intro) by Pierre Augier of a PEP draft (https://docs.google.com/document/d/1hi7VJEfd7_59rqgkQhT1frmtxaktjnsVxeKZKFbxpJ8/edit). I wrote with my own point of view of Python user and package maintainer. I guess what I wrote is not actually adapted for this first PEP, but it seems to me that it can anyway be useful.

Authors: Stepan Sindelar, Petr Viktorin, Antonio Cuni, Tim Felgentreff, Mark Shannon, Ken Jin

Note: this PEP will be moved to the Py-NI repo once it’s more concrete.

Abstract

@paugier
paugier / fargo3d.tex
Created April 3, 2025 13:37
Simple tex files
\documentclass[11pt]{article}
\usepackage[utf8]{inputenc}
\usepackage[french]{babel}
\usepackage{amsmath, amssymb}
\usepackage{graphicx}
\usepackage{geometry}
\usepackage{enumitem}
\usepackage{hyperref}
\geometry{margin=2.5cm}
@paugier
paugier / bench.py
Created March 25, 2020 08:50
Performance issue with nested loops and np.sum in the inner one
"""
See https://github.com/serge-sans-paille/pythran/issues/1501
"""
from functools import partial
import numpy as np
from transonic import jit, wait_for_all_extensions
@paugier
paugier / notes.md
Last active November 1, 2019 22:51
Notes pour Laura sur présentation pyconfr 2019 sur Transonic

Notes pour Laura sur présentation pyconfr 2019 sur Transonic

http://tiny.cc/pyconfr2019-transonic

J'essaierai de te faire un pdf mais pas sûr que j'y arrive. Je n'ai jamais vraiment fait ça...

  1. Titre, institutions et personnes

  2. De quoi on parle : un nouveau paquet Python. Oh la belle image. On part de Python/Numpy et Transonic accélère ça avec Cython, Numba et Pythran.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@paugier
paugier / histogram_fluidpythran.py
Created December 7, 2018 21:48
histogram_fluidpythran.py
import numpy as np
from fluidpythran import boost, Array, NDim
@boost
def nint(x: float):
if x >= 0:
return int(x + 0.5)
@paugier
paugier / my_pythran_file.py
Created November 14, 2018 05:27
pythran dataclass
from dataclasses import dataclass
@dataclass
class Base:
a: "float[:, :]"
b: "float[:, :]"
c: "float[:, :]"
def intermediate(self, d: int):