From 23b2ba9950cb4fab33f0b53565ae762cfa2f7a45 Mon Sep 17 00:00:00 2001 From: Iaroslav Date: Mon, 29 Jun 2020 03:49:29 +0700 Subject: [PATCH] Optimize reverse division for FP INDArrayAlgebra --- .../src/main/kotlin/scientifik.kmath.nd4j/INDArrayAlgebra.kt | 1 + 1 file changed, 1 insertion(+) diff --git a/kmath-nd4j/src/main/kotlin/scientifik.kmath.nd4j/INDArrayAlgebra.kt b/kmath-nd4j/src/main/kotlin/scientifik.kmath.nd4j/INDArrayAlgebra.kt index 44d8f6611..f476af0d5 100644 --- a/kmath-nd4j/src/main/kotlin/scientifik.kmath.nd4j/INDArrayAlgebra.kt +++ b/kmath-nd4j/src/main/kotlin/scientifik.kmath.nd4j/INDArrayAlgebra.kt @@ -57,6 +57,7 @@ interface INDArrayRing : interface INDArrayField : NDField, INDArrayRing where F : Field, N : INDArrayStructure, N : MutableNDStructure { override fun divide(a: N, b: N): N = a.ndArray.divi(b.ndArray).wrap() + override fun Number.div(b: N): N = b.ndArray.rdivi(this).wrap() } class RealINDArrayField(override val shape: IntArray, override val elementContext: Field = RealField) :