0.3.0-dev-17

This commit is contained in:
Alexander Nozik 2021-10-18 13:18:10 +03:00
parent ae8655d6af
commit 98bbc8349c
2 changed files with 3 additions and 9 deletions

View File

@ -19,7 +19,7 @@ allprojects {
}
group = "space.kscience"
version = "0.3.0-dev-16"
version = "0.3.0-dev-17"
}
subprojects {

View File

@ -5,20 +5,14 @@
package space.kscience.kmath.tensors
import edu.mcgill.kaliningraph.power
import org.jetbrains.kotlinx.multik.api.Multik
import org.jetbrains.kotlinx.multik.api.linalg.dot
import org.jetbrains.kotlinx.multik.api.math.exp
import org.jetbrains.kotlinx.multik.api.ndarray
import org.jetbrains.kotlinx.multik.ndarray.operations.minus
import org.jetbrains.kotlinx.multik.ndarray.operations.plus
import org.jetbrains.kotlinx.multik.ndarray.operations.unaryMinus
import space.kscience.kmath.multik.multikND
import space.kscience.kmath.nd.one
import space.kscience.kmath.operations.DoubleField
fun main(): Unit = with(DoubleField.multikND) {
val a = Multik.ndarray(intArrayOf(1, 2, 3)).asType<Double>().wrap()
val b = Multik.ndarray(doubleArrayOf(1.0, 2.0, 3.0))
one(a.shape) - a
val b = Multik.ndarray(doubleArrayOf(1.0, 2.0, 3.0)).wrap()
one(a.shape) - a + b * 3
}