MCPcopy Create free account
hub / github.com/NodeDB-Lab/nodedb / sub_and_mul

Function sub_and_mul

nodedb-array/src/query/elementwise.rs:221–229  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

219
220 #[test]
221 fn sub_and_mul() {
222 let s = schema();
223 let a = tile(&[(0, 10)]);
224 let b = tile(&[(0, 3)]);
225 let s1 = elementwise(&s, &a, &b, BinaryOp::Sub).unwrap();
226 let s2 = elementwise(&s, &a, &b, BinaryOp::Mul).unwrap();
227 assert_eq!(s1.attr_cols[0][0], CellValue::Int64(7));
228 assert_eq!(s2.attr_cols[0][0], CellValue::Int64(30));
229 }
230}

Callers

nothing calls this directly

Calls 3

elementwiseFunction · 0.85
schemaFunction · 0.70
tileFunction · 0.70

Tested by

no test coverage detected