From a0b72f519bc9eac04ae9f338ec59d38e74272a72 Mon Sep 17 00:00:00 2001 From: Roland Grinis Date: Sat, 10 Jul 2021 16:47:10 +0100 Subject: [PATCH] bug in div --- .../src/main/kotlin/space/kscience/kmath/noa/algebras.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kmath-noa/src/main/kotlin/space/kscience/kmath/noa/algebras.kt b/kmath-noa/src/main/kotlin/space/kscience/kmath/noa/algebras.kt index df010b7e8..36de8abf3 100644 --- a/kmath-noa/src/main/kotlin/space/kscience/kmath/noa/algebras.kt +++ b/kmath-noa/src/main/kotlin/space/kscience/kmath/noa/algebras.kt @@ -352,7 +352,7 @@ protected constructor(scope: NoaScope) : JNoa.timesDoubleAssign(value, tensor.tensorHandle) override fun Double.div(other: Tensor): NoaDoubleTensor = - other * (1 / this) + other.tensor * (1 / this) override fun Tensor.div(value: Double): NoaDoubleTensor = tensor * (1 / value) @@ -428,7 +428,7 @@ protected constructor(scope: NoaScope) : JNoa.timesFloatAssign(value, tensor.tensorHandle) override fun Float.div(other: Tensor): NoaFloatTensor = - other * (1 / this) + other.tensor * (1 / this) override fun Tensor.div(value: Float): NoaFloatTensor = tensor * (1 / value)