From c20c9a2c5a47a79e6a140f55223edbc7bb2a54d5 Mon Sep 17 00:00:00 2001 From: lyken Date: Wed, 19 Jun 2024 09:47:57 +0800 Subject: [PATCH] core: minor doc refine for helper_call_numpy() --- nac3core/src/codegen/builtin_fns.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/nac3core/src/codegen/builtin_fns.rs b/nac3core/src/codegen/builtin_fns.rs index d26e6654..a951dd7a 100644 --- a/nac3core/src/codegen/builtin_fns.rs +++ b/nac3core/src/codegen/builtin_fns.rs @@ -1050,7 +1050,8 @@ pub fn call_numpy_maximum<'ctx, G: CodeGenerator + ?Sized>( /// * `fn_name`: The name of the function, only used when throwing an error with [`unsupported_type`] /// * `get_ret_elem_type`: A function that takes in the input element [`Type`], and returns the correct return [`Type`]. /// Return a constant [`Type`] here if the return type does not depend on the input type. -/// * `on_elem`: The function to be called when the input argument is not an ndarray. +/// * `on_elem`: The function to be called when the input argument is not an ndarray. Returns [`Option::None`] +/// if the element type & value are faulty and should panic with [`unsupported_type`]. fn helper_call_numpy<'ctx, OnElemFn, RetElemFn, G: CodeGenerator + ?Sized>( generator: &mut G, ctx: &mut CodeGenContext<'ctx, '_>,