You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mxnet.apache.org by gi...@git.apache.org on 2017/09/13 22:04:44 UTC

[GitHub] mli commented on a change in pull request #7874: Default shape and context attributes for operators

mli commented on a change in pull request #7874: Default shape and context attributes for operators
URL: https://github.com/apache/incubator-mxnet/pull/7874#discussion_r138752087
 
 

 ##########
 File path: python/mxnet/ndarray/op.py
 ##########
 @@ -83,16 +91,29 @@ def _make_ndarray_function(handle, name):
                          ret_type)
 
     dtype_name = None
+    shape_name = None
+    ctx_name = None
     arr_name = None
     ndsignature = []
     signature = []
     ndarg_names = []
     kwarg_names = []
+    is_random_op = _is_random_op(func_name)
     for i in range(narg):
         name, atype = arg_names[i], arg_types[i]
         if name == 'dtype':
             dtype_name = name
-            signature.append('%s=_Null'%name)
+            signature.append('%s=_Null' % name)
+        elif name == 'shape' and is_random_op:
 
 Review comment:
   agree it is a little bit hacky, but let merge a runnable version first
 
----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services