Dev #194

Merged
altavir merged 266 commits from dev into master 2021-01-20 17:32:32 +03:00
Showing only changes of commit e466f4bdf2 - Show all commits

View File

@ -3,6 +3,7 @@ package scientifik.kmath.nd4j
import org.nd4j.linalg.factory.Nd4j
import kotlin.test.Test
import kotlin.test.assertEquals
import scientifik.kmath.structures.get
internal class INDArrayStructureTest {
@Test
@ -35,4 +36,11 @@ internal class INDArrayStructureTest {
val struct = INDArrayIntStructure(nd)
assertEquals(5, struct.dimension)
}
@Test
fun testGet() {
val nd = Nd4j.rand(10, 2, 3, 6)!!
val struct = INDArrayIntStructure(nd)
assertEquals(nd.getInt(0, 0, 0, 0), struct[0, 0, 0, 0])
}
}