Function elements

Source
pub fn elements<const D: usize>(shape: &[(Dimension, usize); D]) -> usize
Expand description

Returns the product of the dimension lengths in the provided shape.

This is equal to the number of elements that will be stored for these dimensions. A 0 dimensional tensor stores exactly 1 element, a 1 dimensional tensor stores N elements, a 2 dimensional tensor stores NxM elements and so on.