-
Notifications
You must be signed in to change notification settings - Fork 211
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix implicit conversion of
nb::ndarray
to contiguous layout
nanobind ndarrays provide the ``nb::c_contig`` and ``nb::f_contig`` annotations to specify that input arrays must be represented by contiguous memory blocks in C or Fortran-style ordering. When this is not the case, the nanobind will by default attempt an implicit conversion. This conversion previously failed in some cases: when no underlying scalar type was specified, and when converting from PyTorch. Those issues are addressed by this commit. Fixes issue #278.
- Loading branch information
Showing
3 changed files
with
32 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters