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/05/24 21:15:25 UTC

[GitHub] [incubator-mxnet] reminisce commented on a change in pull request #15063: Rename np_compat to np_shape

reminisce commented on a change in pull request #15063: Rename np_compat to np_shape
URL: https://github.com/apache/incubator-mxnet/pull/15063#discussion_r287517198
 
 

 ##########
 File path: python/mxnet/util.py
 ##########
 @@ -44,3 +45,162 @@ def get_gpu_memory(gpu_dev_id):
     total_mem = ctypes.c_uint64(0)
     check_call(_LIB.MXGetGPUMemoryInformation64(gpu_dev_id, ctypes.byref(free_mem), ctypes.byref(total_mem)))
     return free_mem.value, total_mem.value
+
+
+def set_np_shape(active):
+    """
+    Turns on/off NumPy shape semantics.  This is turned off by default for
+    keeping backward compatibility.
+
+    Please note that this is designed as an infrastructure for the incoming
+    MXNet-NumPy operators. Legacy operators registered in the modules
+    `mx.nd` and `mx.sym` are not guaranteed to behave like their counterparts
+    in NumPy within this semantics.
+
+    Parameters
+    ----------
+    active : bool
+        Indicates whether to turn on/off NumPy compatibility.
+
+    Returns
+    -------
+        A bool value indicating the previous state of NumPy compatibility.
+    """
 
 Review comment:
   Done.

----------------------------------------------------------------
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