MCPcopy Create free account
hub / github.com/ciphermodelabs/ciphercore / sum

Method sum

ciphercore-base/src/graphs.rs:916–918  ·  view source on GitHub ↗

Adds a node to the parent graph that computes the sum of entries of the array associated with the node along given axes. Applies [Graph::sum] to the parent graph, `this` node and `axes`. # Example ``` # use ciphercore_base::graphs::create_context; # use ciphercore_base::data_types::{INT32, array_type}; let c = create_context().unwrap(); let g = c.create_graph().unwrap(); let t = array_type(vec!

(&self, axes: ArrayShape)

Source from the content-addressed store, hash-verified

914 /// let n2 = n1.sum(axes).unwrap();
915 /// ```
916 pub fn sum(&self, axes: ArrayShape) -> Result<Node> {
917 self.get_graph().sum(self.clone(), axes)
918 }
919
920 /// Adds a node to the parent graph that computes the cumulative sum of elements along a given axis.
921 ///

Callers 8

test_sum_workerFunction · 0.45
test_sum_worker_failFunction · 0.45
test_wellformed_casesFunction · 0.45
compute_naive_aucFunction · 0.45
test_resharingFunction · 0.45
test_resharingFunction · 0.45

Calls 3

cloneMethod · 0.80
add_nodeMethod · 0.80
get_graphMethod · 0.45

Tested by 6

test_sum_workerFunction · 0.36
test_sum_worker_failFunction · 0.36
test_wellformed_casesFunction · 0.36
test_resharingFunction · 0.36
test_resharingFunction · 0.36