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: patch-diff.githubusercontent.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:832a745e-bdf5-3616-25c9-6d9f09283bde |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | D412:360CD8:15A08ED:1D515DB:696EA617 |
| html-safe-nonce | f2d2aae261a60abf3d12ebd438ed0c620167b9a9c88d9173c709b3cd2669935b |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJENDEyOjM2MENEODoxNUEwOEVEOjFENTE1REI6Njk2RUE2MTciLCJ2aXNpdG9yX2lkIjoiOTA1NzI1MDU0NjIyNDYzNzQ2MyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 3407ea34d498bd68e0d27388e20b4ba3a5ec8ad0da95b2d259f0f63b52c20f8a |
| 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 | fdad15fd2ad43212aa8b8be5f2c2725550f8374ceeeb154a999ad9145b43f3f7 |
| 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 | 27b23bc056eb973d350fc95afc848757edb9e7a9 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width