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 2020/05/13 20:18:36 UTC

[GitHub] [incubator-mxnet] yzhliu commented on a change in pull request #18251: New set default dtype

yzhliu commented on a change in pull request #18251:
URL: https://github.com/apache/incubator-mxnet/pull/18251#discussion_r424703989



##########
File path: python/mxnet/ndarray/numpy/random.py
##########
@@ -112,7 +113,9 @@ def uniform(low=0.0, high=1.0, size=None, dtype=None, ctx=None, out=None):
         a scalar tensor containing a single value is returned if
         ``low`` and ``high`` are both scalars.
     dtype : {'float16', 'float32', 'float64'}, optional
-        Data type of output samples. Default is 'float32'
+        Data type of output samples.
+        When npx.is_np_default_dtype() returns Flase, default dtype is float32;

Review comment:
       ```suggestion
           When npx.is_np_default_dtype() returns False, default dtype is float32;
   ```

##########
File path: python/mxnet/util.py
##########
@@ -840,7 +840,7 @@ def set_np(shape=True, array=True):
 
 
 def reset_np():
-    """Deactivate NumPy shape and array semantics at the same time."""
+    """Deactivate NumPy shape and array and deafult dtype semantics at the same time."""
     set_np(shape=False, array=False)

Review comment:
       should we explicitly specify `dtype=False`?

##########
File path: python/mxnet/ndarray/numpy/random.py
##########
@@ -112,7 +113,9 @@ def uniform(low=0.0, high=1.0, size=None, dtype=None, ctx=None, out=None):
         a scalar tensor containing a single value is returned if
         ``low`` and ``high`` are both scalars.
     dtype : {'float16', 'float32', 'float64'}, optional
-        Data type of output samples. Default is 'float32'
+        Data type of output samples.
+        When npx.is_np_default_dtype() returns Flase, default dtype is float32;

Review comment:
       so as elsewhere.




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