From 2a922c74800d1da934f722a61aa3af4ff783ea05 Mon Sep 17 00:00:00 2001 From: David Mak Date: Wed, 17 Jan 2024 10:40:08 +0800 Subject: [PATCH] artiq: Fix source module of NDArray Should be `numpy.typing` instead of `numpy`. --- nac3artiq/src/lib.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/nac3artiq/src/lib.rs b/nac3artiq/src/lib.rs index 7a1183d7e..7bb3a24a2 100644 --- a/nac3artiq/src/lib.rs +++ b/nac3artiq/src/lib.rs @@ -856,6 +856,7 @@ impl Nac3 { let builtins_mod = PyModule::import(py, "builtins").unwrap(); let id_fn = builtins_mod.getattr("id").unwrap(); let numpy_mod = PyModule::import(py, "numpy").unwrap(); + let numpy_typing_mod = PyModule::import(py, "numpy.typing").unwrap(); let typing_mod = PyModule::import(py, "typing").unwrap(); let types_mod = PyModule::import(py, "types").unwrap(); @@ -880,7 +881,7 @@ impl Nac3 { float: get_attr_id(builtins_mod, "float"), float64: get_attr_id(numpy_mod, "float64"), list: get_attr_id(builtins_mod, "list"), - ndarray: get_attr_id(numpy_mod, "NDArray"), + ndarray: get_attr_id(numpy_typing_mod, "NDArray"), tuple: get_attr_id(builtins_mod, "tuple"), exception: get_attr_id(builtins_mod, "Exception"), option: get_id(artiq_builtins.get_item("Option").ok().flatten().unwrap()),