Data descriptors expose total_size, but there is no total_elements. Array.total_size is the allocated span, which can exceed the logical element count when strides or padding are given, so callers that need the number of elements recompute prod(shape) themselves.
Proposal: add a total_elements property to dace.data (at least Data, Array, Scalar, Stream), with Scalar returning 1, so that total_elements and total_size are both valid on every descriptor, scalars included.
Data descriptors expose
total_size, but there is nototal_elements.Array.total_sizeis the allocated span, which can exceed the logical element count when strides or padding are given, so callers that need the number of elements recomputeprod(shape)themselves.Proposal: add a
total_elementsproperty todace.data(at leastData,Array,Scalar,Stream), withScalarreturning 1, so thattotal_elementsandtotal_sizeare both valid on every descriptor, scalars included.