Title: Add support for nanobind? · Issue #284 · xtensor-stack/xtensor-python · GitHub
Open Graph Title: Add support for nanobind? · Issue #284 · xtensor-stack/xtensor-python
X Title: Add support for nanobind? · Issue #284 · xtensor-stack/xtensor-python
Description: After a quick inspection of xtensor-python's internals, it looks like it shouldn't be too hard supporting both pybind11 and nanobind via some sort of minimal compatibility layer? Both have a pretty similar API for the basic features, and...
Open Graph Description: After a quick inspection of xtensor-python's internals, it looks like it shouldn't be too hard supporting both pybind11 and nanobind via some sort of minimal compatibility layer? Both have a pretty...
X Description: After a quick inspection of xtensor-python's internals, it looks like it shouldn't be too hard supporting both pybind11 and nanobind via some sort of minimal compatibility layer? Both have ...
Opengraph URL: https://github.com/xtensor-stack/xtensor-python/issues/284
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Add support for nanobind?","articleBody":"After a quick inspection of xtensor-python's internals, it looks like it shouldn't be too hard supporting both pybind11 and [nanobind](https://github.com/wjakob/nanobind) 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?\r\n\r\nNanobind is more performant than pybind11 and also offers more control via its [low-level interface](https://github.com/wjakob/nanobind/blob/master/docs/lowlevel.md), which would make things much easier for my use case (*). However, nanobind's numpy support is currently limited, e.g., it doesn't provide a `vectorize` helper (not sure it will anytime soon?) which is something that I also need. Xtensor-python would nicely fill this gap I guess.\r\n\r\n(*) 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 the `numpy.object` dtype.\r\n","author":{"url":"https://github.com/benbovy","@type":"Person","name":"benbovy"},"datePublished":"2022-12-01T20:49:28.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":15},"url":"https://github.com/284/xtensor-python/issues/284"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:886bf97d-e84d-5835-07bb-30c6fbd29e90 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 97DC:FA8DE:3BF52D2:4FA8D1D:6964B80B |
| html-safe-nonce | 2a983a274032799d42233ee28cd58896babf28798111b938517f2eb6252cc9c1 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5N0RDOkZBOERFOjNCRjUyRDI6NEZBOEQxRDo2OTY0QjgwQiIsInZpc2l0b3JfaWQiOiI4ODYyMDQ0MTE1MTE3MDYyMTU1IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | b5176e770b6105ffb9a4895b4ecc085eec56199c751c31ddb84301e2848ccada |
| hovercard-subject-tag | issue:1471937691 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/xtensor-stack/xtensor-python/284/issue_layout |
| twitter:image | https://opengraph.githubassets.com/1ec7bbc752ceea1c82dc69127b7094c68eaa2e01b637a6c951c1d2739ceec536/xtensor-stack/xtensor-python/issues/284 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/1ec7bbc752ceea1c82dc69127b7094c68eaa2e01b637a6c951c1d2739ceec536/xtensor-stack/xtensor-python/issues/284 |
| og:image:alt | After a quick inspection of xtensor-python's internals, it looks like it shouldn't be too hard supporting both pybind11 and nanobind via some sort of minimal compatibility layer? Both have a pretty... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | benbovy |
| hostname | github.com |
| expected-hostname | github.com |
| None | 15579c46431b7fd25941c3b09010f74fd1890c7a35226839bbbf40ce70fb3057 |
| turbo-cache-control | no-preview |
| go-import | github.com/xtensor-stack/xtensor-python git https://github.com/xtensor-stack/xtensor-python.git |
| octolytics-dimension-user_id | 56542697 |
| octolytics-dimension-user_login | xtensor-stack |
| octolytics-dimension-repository_id | 73431892 |
| octolytics-dimension-repository_nwo | xtensor-stack/xtensor-python |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 73431892 |
| octolytics-dimension-repository_network_root_nwo | xtensor-stack/xtensor-python |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 499abb347cb197601d399c346cfeb4b3fa135d5c |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width