From 25b4d4794f46074eb73894d52e180052614dc47a Mon Sep 17 00:00:00 2001 From: Nicolas Patry Date: Thu, 17 Nov 2022 20:08:25 +0100 Subject: [PATCH] Fixing unimplemented into real exception. (#78) --- bindings/python/src/lib.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/bindings/python/src/lib.rs b/bindings/python/src/lib.rs index b5f40fb..81f7d00 100644 --- a/bindings/python/src/lib.rs +++ b/bindings/python/src/lib.rs @@ -64,7 +64,9 @@ fn prepare(tensor_dict: HashMap) -> PyResult Dtype::F64, "bfloat16" => Dtype::BF16, dtype_str => { - unimplemented!("Did not cover this dtype: {}", dtype_str) + return Err(exceptions::PyException::new_err(format!( + "dtype {dtype_str} is not covered", + ))); } } } -- 2.43.0