2 ms·
They can! Numpy exposes a C API to other Python programs [0]. It's not hard to write a Cython library that uses the Numpy C API directly and does not cross into
by kylebarron 4y ago
They can! Numpy exposes a C API to other Python programs [0]. It's not hard to write a Cython library that uses the Numpy C API directly and does not cross into Python [1].
[0]: https://numpy.org/doc/stable/reference/c-api/index.html https://numpy.org/doc/stable/reference/c-api/index.html
[1]: https://github.com/kylebarron/pymartini/blob/4774549ffa2051c4ddaa254aca191bedcc4d30c5/pymartini/martini.pyx#L2 https://github.com/kylebarron/pymartini/blob/4774549ffa2051c...
- chrisseaton 4y agoSo they can if you use their specific API? It doesn’t naturally compose in conventional Python code?