diff --git a/kmath-nd4j/src/test/kotlin/scientifik/kmath/nd4j/INDArrayStructureTest.kt b/kmath-nd4j/src/test/kotlin/scientifik/kmath/nd4j/INDArrayStructureTest.kt index 235b65556..239289262 100644 --- a/kmath-nd4j/src/test/kotlin/scientifik/kmath/nd4j/INDArrayStructureTest.kt +++ b/kmath-nd4j/src/test/kotlin/scientifik/kmath/nd4j/INDArrayStructureTest.kt @@ -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]) + } }