kalyc commented on a change in pull request #13281: [MXNET-1214] clean up the 
NDArray
URL: https://github.com/apache/incubator-mxnet/pull/13281#discussion_r233923453
 
 

 ##########
 File path: 
scala-package/core/src/main/scala/org/apache/mxnet/javaapi/NDArray.scala
 ##########
 @@ -285,94 +295,94 @@ class NDArray private[mxnet] (val nd : 
org.apache.mxnet.NDArray ) {
     * Get context of current NDArray.
     * @return The context of current NDArray.
     */
-  def context : Context = nd.context
+  def context: Context = nd.context
 
   /**
     * Set the values of the NDArray
     * @param value Value to set
     * @return Current NDArray
     */
-  def set(value : Float) : NDArray = nd.set(value)
-  def set(other : NDArray) : NDArray = nd.set(other)
-  def set(other : Array[Float]) : NDArray = nd.set(other)
-
-  def add(other : NDArray) : NDArray = this.nd + other.nd
-  def add(other : Float) : NDArray = this.nd + other
-  def _add(other : NDArray) : NDArray = this.nd += other
-  def _add(other : Float) : NDArray = this.nd += other
-  def subtract(other : NDArray) : NDArray = this.nd - other
-  def subtract(other : Float) : NDArray = this.nd - other
-  def _subtract(other : NDArray) : NDArray = this.nd -= other
-  def _subtract(other : Float) : NDArray = this.nd -= other
-  def multiply(other : NDArray) : NDArray = this.nd * other
-  def multiply(other : Float) : NDArray = this.nd * other
-  def _multiply(other : NDArray) : NDArray = this.nd *= other
-  def _multiply(other : Float) : NDArray = this.nd *= other
-  def div(other : NDArray) : NDArray = this.nd / other
-  def div(other : Float) : NDArray = this.nd / other
-  def _div(other : NDArray) : NDArray = this.nd /= other
-  def _div(other : Float) : NDArray = this.nd /= other
-  def pow(other : NDArray) : NDArray = this.nd ** other
-  def pow(other : Float) : NDArray = this.nd ** other
-  def _pow(other : NDArray) : NDArray = this.nd **= other
-  def _pow(other : Float) : NDArray = this.nd **= other
-  def mod(other : NDArray) : NDArray = this.nd % other
-  def mod(other : Float) : NDArray = this.nd % other
-  def _mod(other : NDArray) : NDArray = this.nd %= other
-  def _mod(other : Float) : NDArray = this.nd %= other
-  def greater(other : NDArray) : NDArray = this.nd > other
-  def greater(other : Float) : NDArray = this.nd > other
-  def greaterEqual(other : NDArray) : NDArray = this.nd >= other
-  def greaterEqual(other : Float) : NDArray = this.nd >= other
-  def lesser(other : NDArray) : NDArray = this.nd < other
-  def lesser(other : Float) : NDArray = this.nd < other
-  def lesserEqual(other : NDArray) : NDArray = this.nd <= other
-  def lesserEqual(other : Float) : NDArray = this.nd <= other
+  def set(value: Float): NDArray = nd.set(value)
+  def set(other: NDArray): NDArray = nd.set(other)
+  def set(other: Array[Float]): NDArray = nd.set(other)
+
+  def add(other: NDArray): NDArray = this.nd + other.nd
+  def add(other: Float): NDArray = this.nd + other
+  def addInplace(other: NDArray): NDArray = this.nd += other
 
 Review comment:
   have these new operators been tested locally? Or are there unit tests for 
them?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to