tingying2020 commented on a change in pull request #16016: [numpy] operator ravel, derive from reshape URL: https://github.com/apache/incubator-mxnet/pull/16016#discussion_r323614375
########## File path: python/mxnet/ndarray/numpy/_op.py ########## @@ -2363,3 +2363,55 @@ def var(a, axis=None, dtype=None, out=None, ddof=0, keepdims=False): # pylint: 0.2025 """ return _npi.var(a, axis=axis, dtype=dtype, ddof=ddof, keepdims=keepdims, out=out) + + +@set_module('mxnet.ndarray.numpy') +def ravel(x, out=None): + r""" + ravel(x, out=None) + + Return a contiguous flattened array. + A 1-D array, containing the elements of the input, is returned. A copy is + made only if needed. + + Parameters + ---------- + x : ndarray + Input array. The elements in `x` are read in row-major, C-style order and + packed as a 1-D array. + out : ndarray or None, optional + A location into which the result is stored. If not provided or `None`, + a freshly-allocated array is returned. Review comment: Sorry, my bad. It should be used and unlike numpy, lots of mxnet operator support out. Thank you. ---------------------------------------------------------------- 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: us...@infra.apache.org With regards, Apache Git Services