A tiny performance improvement.
@@ -95,7 +95,7 @@ public class INDArrayShim {
private static INDArray scalarDivideWithPreservedShape(INDArray a, INDArray b) {
if (b.length() != 1) {
- return scalarMultiplyWithPreservedShape(b.rdiv(1.0), a);
+ return scalarMultiplyWithPreservedShape(a, b.rdiv(1.0));
}
INDArray result = a.divi(b.getScalar(0));
long[] resultShape = Shape.broadcastOutputShape(a.shape(), b.shape());
