#include "tensorstore/tensorstore.h"
Result<DimensionUnitsVector>
tensorstore::TensorStore<ElementType, Rank, Mode>::dimension_units()
   
 const;

Returns the dimension units.

The returned vector has a length equal to this->rank().

Example:

TENSORSTORE_ASSERT_OK_AND_ASSIGN(
    auto store,
    tensorstore::Open({
        {"driver", "array"},
        {"array", {1, 2, 3}},
        {"dtype", "int32"},
        {"schema", {{"dimension_units", {"4nm"}}}}}).result());
EXPECT_THAT(store.dimension_units(),
            ::testing::Optional(::testing::ElementsAre(
                tensorstore::Unit(4, "nm"))));