MCPcopy Create free account
hub / github.com/YuminosukeSato/ironkernel / math_all_unary_functions

Function math_all_unary_functions

src/python/py_kernel.rs:572–594  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

570
571 #[test]
572 fn math_all_unary_functions() {
573 let km = PyKernelModule::new();
574 let funcs: Vec<fn(&PyKernelModule, PyExpr) -> PyExpr> = vec![
575 PyKernelModule::sqrt,
576 PyKernelModule::abs,
577 PyKernelModule::log,
578 PyKernelModule::exp,
579 PyKernelModule::log2,
580 PyKernelModule::log10,
581 PyKernelModule::floor,
582 PyKernelModule::ceil,
583 PyKernelModule::round,
584 PyKernelModule::sin,
585 PyKernelModule::cos,
586 PyKernelModule::tan,
587 ];
588 for f in funcs {
589 let x = km.arg("x");
590 let result = f(&km, x.clone());
591 assert_eq!(result.temp_args.len(), 1);
592 assert!(matches!(result.inner, Expr::Unary(_, _)));
593 }
594 }
595
596 // --- Binary math functions ---
597

Callers

nothing calls this directly

Calls 1

argMethod · 0.45

Tested by

no test coverage detected