forked from kscience/kmath
Move narrowToIntArray to new file
This commit is contained in:
parent
3df9892de5
commit
9a4dd31507
@ -0,0 +1,3 @@
|
|||||||
|
package scientifik.kmath.nd4j
|
||||||
|
|
||||||
|
internal fun narrowToIntArray(la: LongArray): IntArray = IntArray(la.size) { la[it].toInt() }
|
@ -3,8 +3,6 @@ package scientifik.kmath.nd4j
|
|||||||
import org.nd4j.linalg.api.ndarray.INDArray
|
import org.nd4j.linalg.api.ndarray.INDArray
|
||||||
import scientifik.kmath.structures.NDStructure
|
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> {
|
data class ND4JStructure<T>(val ndArray: INDArray) : NDStructure<INDArray> {
|
||||||
override val shape: IntArray
|
override val shape: IntArray
|
||||||
get() = narrowToIntArray(ndArray.shape())
|
get() = narrowToIntArray(ndArray.shape())
|
||||||
|
Loading…
Reference in New Issue
Block a user