reminisce commented on a change in pull request #15377: [numpy][doc-fix] 
zeros_like, linspace, reciprocal, square, and arcsin
URL: https://github.com/apache/incubator-mxnet/pull/15377#discussion_r298003048
 
 

 ##########
 File path: python/mxnet/_numpy_op_doc.py
 ##########
 @@ -71,19 +71,63 @@ def _np_ones_like(a):
     pass
 
 
-def _np_zeros_like(a):
-    """Return an array of zeros with the same shape and type as a given array.
+def _np_zeros_like(a, dtype=None, **kwargs):
+    """
+    zeros_like(a, dtype=None, order='C', subok=True)
+
+    Return an array of zeros with the same shape and type as a given array.
 
     Parameters
     ----------
     a : ndarray
-        The shape and data-type of `a` define these same attributes of
+        The shape of `a` define these same attributes of
         the returned array.
-
+    dtype : data-type, optional
+        Overrides the data type of the result.
+        .. versionadded:: 1.6.0
+    order : {'C'}, optional, default: C
+        Store multi-dimensional data in row-major
+        (C-style) in memory. Note that the column-major is not supported yet.
+    
     Returns
     -------
     out : ndarray
         Array of zeros with the same shape and type as `a`.
+
+
+    See Also
+    --------
+    empty_like : Return an empty array with shape and type of input.
+    ones_like : Return an array of ones with shape and type of input.
+    full_like : Return a new array with shape of input filled with value.
+    zeros : Return a new array setting values to zero.
+
+    Examples
+    --------
+    >>> x = np.arange(6)
+    >>> x = x.reshape((2, 3))
+    >>> x
+    array([[0, 1, 2],
+           [3, 4, 5]])
+    >>> np.zeros_like(x)
+    array([[0, 0, 0],
+           [0, 0, 0]])
+    >>> y = np.arange(3, dtype=float)
 
 Review comment:
   No need to use `dtype=float`. Please update the output with the latest code.
   ```python
   >>> y = np.arange(3)
   >>> y
   array([0., 1., 2.])
   ```

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

Reply via email to