allow conversion to dlpack (#1120)

This commit is contained in:
Awni Hannun
2024-05-16 16:11:37 -07:00
committed by GitHub
parent 8b76571896
commit 81dd33af66
4 changed files with 41 additions and 26 deletions

View File

@@ -13,4 +13,6 @@ using namespace mlx::core;
array nd_array_to_mlx(
nb::ndarray<nb::ro, nb::c_contig, nb::device::cpu> nd_array,
std::optional<Dtype> dtype);
nb::ndarray<nb::numpy> mlx_to_np_array(const array& a);
nb::ndarray<> mlx_to_dlpack(const array& a);