Note to self. I have kids who wake at 6.30 for school. I shouldn't program past 22.30, much less 23.30, as it's far too easy to make mistakes while tired.
In this case, what I thought was a fix, didn't work. So I'm back to trying to figure out what's up with getting #cython to build a #python extension class.
Can't figure out how to use #cython to define a reusable #python extension class.
In the .pxd
cdef class CountFingerprint:
cdef:
...
In the .pyx
from . import _typing
def _err(s):
return ValueError(s)
cdef class CountFingerprint:
def to_pandas(...) -> _typing.PDF:
..
raise _get_value_error(..)
cythonize says "Unknown type declaration '_typing.PDF' in annotation, ignoring" and "undeclared name not builtin: _get_err".
I don't get it. Those are defined in the .pyx.
Help?
#borgbackup 2.0.0b20 was just released!
There is quite some new stuff and also some fixes, please help with testing the betas!
https://github.com/borgbackup/borg/releases/tag/2.0.0b20
#backup #linux #bsd #macOS #openindiana #haiku #python #cython #borg
🐍👨💻 #PythoC — це новий проєкт, який дозволяє використовувати Python як генератор C-коду, пропонуючи більше можливостей і гнучкості, ніж #Cython. Це перший огляд нового інструмента генерації C-коду з #Python, орієнтованого передусім на створення самостійних C-програм.
🔗 https://proit.ua/pythoc-novi-mozhlivosti-ghienieratsiyi-c-kodu/
🔗 https://www.infoworld.com/article/4101101/pythoc-a-new-way-to-generate-c-code-from-python.html
Does anyone know of a good overview how much overhead using ctypes to call functions from a dynamic library adds to #python code instead of building a native extension e.g via #cython #pybind11 or #nanobind ?
A blog post with some statistics would be perfect but just ballpark figures from anyone who knows what they are talking about is fine
I have officially started working as the training coordinator at #MimerAIF (https://mimer-ai.eu/). What better way to kick things off than a course?! These days I am teaching parts of the #PythonForScicomp course in partnership with @coderefinery and @SciCompAalto.
Tomorrow is the last day of the course, but you can still join!
https://scicomp.aalto.fi/training/scip/python-for-scicomp-2025/
I will be covering the episodes on #Cython and #Packaging.