#include "tensorstore/array.h"
template <typename ElementTag,
         
 DimensionIndex Rank,
         
 ArrayOriginKind OriginKind,
         
 ContainerKind CKind>
Array<ElementTag> tensorstore::UnbroadcastArray(
    
const Array<ElementTag, Rank, OriginKind, CKind>source);

Converts zero-stride dimensions (with non-zero size) to have an extent of 1, removes leading singleton dimensions, and translates the origin to 0.

The returned array shares a reference to the data of source.

If there are no such dimensions, and the origin is already 0, the returned array is equivalent to source (i.e. it has the same layout in addition to the same data pointer). In particular, applying this function again to its return value has no effect.