Skip to content
Discussion options

You must be logged in to vote

Oh, maybe you want to return an nb::object? If so, use nb::cast.
https://nanobind.readthedocs.io/en/latest/api_core.html#casting
return nb::cast(nb::ndarray<nb::numpy, float, nb::ndim<2>>(.....))

Replies: 2 comments 5 replies

Comment options

You must be logged in to vote
5 replies
@senyai
Comment options

@hpkfft
Comment options

@hpkfft
Comment options

Answer selected by senyai
@senyai
Comment options

@senyai
Comment options

Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants