Dev #194
@ -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])
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user