diff --git a/kmath-multik/src/main/kotlin/space/kscience/kmath/multik/MultikTensorAlgebra.kt b/kmath-multik/src/main/kotlin/space/kscience/kmath/multik/MultikTensorAlgebra.kt index 04c467861..ed15199a6 100644 --- a/kmath-multik/src/main/kotlin/space/kscience/kmath/multik/MultikTensorAlgebra.kt +++ b/kmath-multik/src/main/kotlin/space/kscience/kmath/multik/MultikTensorAlgebra.kt @@ -171,7 +171,7 @@ public class MultikTensorAlgebra internal constructor( val mt = asMultik().array return if (mt.shape.contentEquals(shape)) { - (this as MultikTensor).array + mt } else { NDArray(mt.data, mt.offset, shape, dim = DN(shape.size), base = mt.base ?: mt) }.wrap() @@ -186,7 +186,7 @@ public class MultikTensorAlgebra internal constructor( ).asDNArray().wrap() } else if (this.shape.size == 2 && other.shape.size == 2) { (asMultik().array.asD2Array() dot other.asMultik().array.asD2Array()).asDNArray().wrap() - } else if(this.shape.size == 2 && other.shape.size == 1) { + } else if (this.shape.size == 2 && other.shape.size == 1) { (asMultik().array.asD2Array() dot other.asMultik().array.asD1Array()).asDNArray().wrap() } else { TODO("Not implemented for broadcasting")