in ndarray/src/main/java/org/tensorflow/ndarray/impl/dense/AbstractDenseNdArray.java [118:133]
public boolean equals(Object obj) {
if (this == obj) {
return true;
}
if (!(obj instanceof AbstractDenseNdArray)) {
return super.equals(obj);
}
AbstractDenseNdArray<?, ?> other = (AbstractDenseNdArray<?, ?>)obj;
if (dimensions().isSegmented() || other.dimensions().isSegmented()) {
return slowEquals(other);
}
if (!shape().equals(other.shape())) {
return false;
}
return buffer().equals(other.buffer());
}