Implement kmath-nd4j: module that implements NDStructure for INDArray of ND4J #116

Merged
CommanderTvis merged 50 commits from nd4j into dev 2020-10-29 19:58:53 +03:00
Showing only changes of commit 23b2ba9950 - Show all commits

View File

@ -57,6 +57,7 @@ interface INDArrayRing<T, R, N> :
interface INDArrayField<T, F, N> : NDField<T, F, N>,
INDArrayRing<T, F, N> where F : Field<T>, N : INDArrayStructure<T>, N : MutableNDStructure<T> {
override fun divide(a: N, b: N): N = a.ndArray.divi(b.ndArray).wrap()
override fun Number.div(b: N): N = b.ndArray.rdivi(this).wrap()
}
class RealINDArrayField(override val shape: IntArray, override val elementContext: Field<Double> = RealField) :