MCPcopy Index your code
hub / github.com/ciphermodelabs/ciphercore / get_slice

Method get_slice

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

Adds a node that extracts a sub-array corresponding to a given slice from the array associated with the node. Applies [Graph::get_slice] to the parent graph, `this` node and `slice`. # Example ``` # use ciphercore_base::graphs::{create_context, SliceElement}; # use ciphercore_base::data_types::{INT32, array_type}; let c = create_context().unwrap(); let g = c.create_graph().unwrap(); let t = arr

(&self, slice: Slice)

Source from the content-addressed store, hash-verified

1001 /// let n2 = n1.get_slice(slice).unwrap();
1002 /// ```
1003 pub fn get_slice(&self, slice: Slice) -> Result<Node> {
1004 self.get_graph().get_slice(self.clone(), slice)
1005 }
1006
1007 /// Adds a node to the parent graph that reshapes a value associated with the node to a given compatible type.
1008 ///

Callers 15

test_get_slice_workerFunction · 0.45
cumulative_orFunction · 0.45
onehotFunction · 0.45
custom_reduce_vecFunction · 0.45
instantiateMethod · 0.45
sub_sliceMethod · 0.45
instantiateMethod · 0.45
single_iteration_graphFunction · 0.45
is_negativeFunction · 0.45
integer_to_bitsFunction · 0.45

Calls 3

cloneMethod · 0.80
add_nodeMethod · 0.80
get_graphMethod · 0.45