Dev #194

Merged
altavir merged 266 commits from dev into master 2021-01-20 17:32:32 +03:00
2 changed files with 3 additions and 2 deletions
Showing only changes of commit 9a4dd31507 - Show all commits

View File

@ -0,0 +1,3 @@
package scientifik.kmath.nd4j
internal fun narrowToIntArray(la: LongArray): IntArray = IntArray(la.size) { la[it].toInt() }

View File

@ -3,8 +3,6 @@ package scientifik.kmath.nd4j
import org.nd4j.linalg.api.ndarray.INDArray
import scientifik.kmath.structures.NDStructure
internal fun narrowToIntArray(la: LongArray): IntArray = IntArray(la.size) { la[it].toInt() }
data class ND4JStructure<T>(val ndArray: INDArray) : NDStructure<INDArray> {
override val shape: IntArray
get() = narrowToIntArray(ndArray.shape())