parent
15e7984392
commit
9f401dc020
|
@ -48,7 +48,7 @@ object Implicits {
|
||||||
Nd4j.create(underlying, shape, ord.value, offset)
|
Nd4j.create(underlying, shape, ord.value, offset)
|
||||||
|
|
||||||
def asNDArray(shape: Int*): INDArray =
|
def asNDArray(shape: Int*): INDArray =
|
||||||
Nd4j.create(underlying, shape.toArray)
|
Nd4j.create(underlying, shape.toArray: _*)
|
||||||
|
|
||||||
def toNDArray: INDArray = Nd4j.create(underlying)
|
def toNDArray: INDArray = Nd4j.create(underlying)
|
||||||
}
|
}
|
||||||
|
@ -64,7 +64,7 @@ object Implicits {
|
||||||
Nd4j.create(underlying, shape, offset, ord.value)
|
Nd4j.create(underlying, shape, offset, ord.value)
|
||||||
|
|
||||||
def asNDArray(shape: Int*): INDArray =
|
def asNDArray(shape: Int*): INDArray =
|
||||||
Nd4j.create(underlying, shape.toArray)
|
Nd4j.create(underlying, shape.toArray: _*)
|
||||||
|
|
||||||
def toNDArray: INDArray = Nd4j.create(underlying)
|
def toNDArray: INDArray = Nd4j.create(underlying)
|
||||||
}
|
}
|
||||||
|
@ -80,7 +80,7 @@ object Implicits {
|
||||||
Nd4j.create(underlying.map(_.toFloat), shape, ord.value, offset)
|
Nd4j.create(underlying.map(_.toFloat), shape, ord.value, offset)
|
||||||
|
|
||||||
def asNDArray(shape: Int*): INDArray =
|
def asNDArray(shape: Int*): INDArray =
|
||||||
Nd4j.create(underlying.map(_.toFloat), shape.toArray)
|
Nd4j.create(underlying.map(_.toFloat), shape.toArray: _*)
|
||||||
|
|
||||||
def toNDArray: INDArray = Nd4j.create(underlying.map(_.toFloat).toArray)
|
def toNDArray: INDArray = Nd4j.create(underlying.map(_.toFloat).toArray)
|
||||||
}
|
}
|
||||||
|
|
|
@ -25,7 +25,7 @@ trait OperatableNDArray[A <: INDArray] {
|
||||||
val underlying: A
|
val underlying: A
|
||||||
|
|
||||||
// to keep compatibility with Predef.any2stringadd syntax.
|
// to keep compatibility with Predef.any2stringadd syntax.
|
||||||
def +(that: String): String = underlying.toString + that
|
def +(that: String): String = underlying.toString() + that
|
||||||
|
|
||||||
// --- INDArray operators
|
// --- INDArray operators
|
||||||
def +(that: INDArray)(implicit ev: NDArrayEvidence[A, _]): A =
|
def +(that: INDArray)(implicit ev: NDArrayEvidence[A, _]): A =
|
||||||
|
|
Loading…
Reference in New Issue