@Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        TensorType other = (TensorType)o;
        if ( (this.rank() == 0) && (other.rank() == 0)) return true;
        if ( this.valueType != other.valueType) return false;
        if ( ! this.dimensions.equals(other.dimensions)) return false;
        return true;
    }
Returns whether this type can simply be renamed to
the given type. This is the same as being assignable, but disregarding
dimension names.
vespajlib/src/main/java/com/yahoo/tensor/TensorType.java