public boolean mathematicallyEquals(TensorType other) {
        if (dimensions().size() != other.dimensions().size()) return false;
        for (int i = 0; i < dimensions().size(); i++)
            if (!dimensions().get(i).name().equals(other.dimensions().get(i).name())) return false;
        return true;
    }
Returns whether the given type has the same dimension names as this
vespajlib/src/main/java/com/yahoo/tensor/TensorType.java