Adds a node that joins a sequence of arrays governed by a given shape. The input arrays should have the same shape or be able to be broadcast to the same shape. For example, stacking 2 arrays of shapes `[2,2]` and `[2,1]` with the outer shape `[2]` works as follows `stack(arrays=[[[1,2],[3,4]], [5,6]], shape=[2]) = [[[1,2],[3,4]], [[5,5], [6,6]]]` # Arguments `nodes` - vector of nodes contain
(&self, nodes: Vec<Node>, outer_shape: ArrayShape)
| 2589 | /// let n3 = g.stack(vec![n1,n2], shape).unwrap(); |
| 2590 | /// ``` |
| 2591 | pub fn stack(&self, nodes: Vec<Node>, outer_shape: ArrayShape) -> Result<Node> { |
| 2592 | self.add_node(nodes, vec![], Operation::Stack(outer_shape)) |
| 2593 | } |
| 2594 | |
| 2595 | /// Adds a node that joins a sequence of arrays along a given axis. |
| 2596 | /// This operation is similar to [the NumPy concatenate](https://numpy.org/doc/stable/reference/generated/numpy.concatenate.html). |