You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mxnet.apache.org by GitBox <gi...@apache.org> on 2019/08/20 03:14:51 UTC

[GitHub] [incubator-mxnet] zoeygxy commented on a change in pull request #15942: Refines NDArray indexing and adds numpy ndarray indexing [DO NOT MERGE YET]

zoeygxy commented on a change in pull request #15942: Refines NDArray indexing and adds numpy ndarray indexing [DO NOT MERGE YET]
URL: https://github.com/apache/incubator-mxnet/pull/15942#discussion_r315491632
 
 

 ##########
 File path: python/mxnet/ndarray/ndarray.py
 ##########
 @@ -2508,6 +2619,88 @@ def copy(self):
         """
         return self.copyto(self.context)
 
+    def slice_assign_scalar(self, value, begin, end, step):
 
 Review comment:
   To enable polymorphism and reuse code as much as possible. I reused NDArray's `_set_nd_basic_indexing` function in ndarray class and wrapping `slice_assign_scalar` and `slice_assign` as class methods can let python automatically call NDArray operators in NDArray processing, and ndarray ones in ndarray processing. If you feel such handling confusing, I can also copy-paste the entire `_set_nd_basic_indexing` function to multiarray.py.

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


With regards,
Apache Git Services