Adds an node with ones of given type. Compared to `constant` this node does produce a big value array in serialized graph. # Arguments `t` - node type # Returns New node with ones of given type. # Example ``` # use ciphercore_base::graphs::create_context; # use ciphercore_base::data_types::{UINT8, array_type}; let c = create_context().unwrap(); let g = c.create_graph().unwrap(); let z = g.o
(&self, t: Type)
| 1607 | /// let z = g.ones(array_type(vec![10, 20], UINT8)).unwrap(); |
| 1608 | /// ``` |
| 1609 | pub fn ones(&self, t: Type) -> Result<Node> { |
| 1610 | self.add_node(vec![], vec![], Operation::Ones(t)) |
| 1611 | } |
| 1612 | |
| 1613 | /// Adds a node that sums two arrays or scalars of the same scalar type elementwise. |
| 1614 | /// |