From 5ead8f0d7f0edc6684920bc2a6f91b516aa7d2e9 Mon Sep 17 00:00:00 2001 From: "hpkfft.com" Date: Sun, 6 Oct 2024 07:11:19 -0700 Subject: [PATCH] Add partial specialization dtype_traits. (#753) --- include/nanobind/ndarray.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/include/nanobind/ndarray.h b/include/nanobind/ndarray.h index c23fff7d..4c27dd26 100644 --- a/include/nanobind/ndarray.h +++ b/include/nanobind/ndarray.h @@ -137,9 +137,9 @@ template <> struct dtype_traits { static constexpr auto name = descr<0>(); }; -template <> struct dtype_traits { - static constexpr dlpack::dtype value{ 0, 0, 0 }; - static constexpr auto name = descr<0>(); +template struct dtype_traits { + static constexpr dlpack::dtype value = dtype_traits::value; + static constexpr auto name = dtype_traits::name; }; template struct shape {