Skip to content

jonwright/c2ImageD11

Repository files navigation

c2ImageD11

All code in this repository was generated by DeepSeek V4 and other large language models, in collaboration with jonwright.

Standalone C extensions for ImageD11, ported from f2py to c2py23. C functions are exposed by a generated CPython extension wrapper. Two functions (blobproperties, sparse_blob2Dproperties) have thin Python allocation wrappers in __init__.py to match f2py's convention of auto-allocating output arrays.

Build

A normal build needs only meson + ninja + a C compiler. The generated files in lib/interface/ are checked into git, so c2py23 is not required.

mkdir -p build/libc2ImageD11
cd build/libc2ImageD11
meson setup ../../lib
ninja
cp _cImageD11.so ../../c2ImageD11/

Regenerate lib/interface/

Run this when C2PY_BLOCKs change or c2py23 is updated (requires c2py23):

python3 tools/harvester.py --output-dir lib/interface

Test

python3 -m pytest tests/

Distributing

Copy _cImageD11.so into c2ImageD11/ and the package is ready -- same pattern as a ctypes library.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors