Skip to content

nb::reference_internal with nb::tensor as return type #53

Answered by wjakob
qnzhou asked this question in Q&A
Discussion options

You must be logged in to vote

The nb::reference_internal feature is intended for cases when you are returning a nanobind-bound object (i.e. something created using nb::class_<>).

The nb::tensor provides an owner parameter specifically for this purpose. Could you try if this works?

Replies: 1 comment 6 replies

Comment options

You must be logged in to vote
6 replies
@qnzhou
Comment options

@wjakob
Comment options

@brettc
Comment options

@qnzhou
Comment options

@brettc
Comment options

Answer selected by qnzhou
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants