- Notifications
You must be signed in to change notification settings - Fork63
Description
After a quick inspection of xtensor-python's internals, it looks like it shouldn't be too hard supporting both pybind11 andnanobind via some sort of minimal compatibility layer? Both have a pretty similar API for the basic features, and unless I'm missing something xtensor-python doesn't seem to depend much on pybind11's numpy and/or other advanced features?
Nanobind is more performant than pybind11 and also offers more control via itslow-level interface, which would make things much easier for my use case (*). However, nanobind's numpy support is currently limited, e.g., it doesn't provide avectorize
helper (not sure it will anytime soon?) which is something that I also need. Xtensor-python would nicely fill this gap I guess.
(*) More context: I'm working on a Python/Numpy library (https://github.com/benbovy/s2shapely) providing bindings for the s2geometry / s2geography libraries, via vectorized functions (ufuncs) operating on Geography objects (C++ wrapped classes) referenced in numpy arrays with thenumpy.object
dtype.