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

Function elementwise_dedup_same_arg

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

Source from the content-addressed store, hash-verified

424
425 #[test]
426 fn elementwise_dedup_same_arg() {
427 let km = PyKernelModule::new();
428 let x = km.arg("x");
429 // x + x (same arg used twice)
430 let expr = PyExpr::binop_with_temp_args(
431 BinaryOp::Add,
432 &x.inner,
433 &x.inner,
434 &x.temp_args,
435 &x.temp_args,
436 );
437 let spec = km.elementwise(expr).unwrap();
438 assert_eq!(spec.inner.args.len(), 1);
439 assert_eq!(spec.inner.args[0].name, "x");
440 }
441
442 #[test]
443 fn elementwise_three_args_order() {

Callers

nothing calls this directly

Calls 2

argMethod · 0.45
elementwiseMethod · 0.45

Tested by

no test coverage detected