piiswrong closed pull request #9748: Doc update - clarify that mx.nd.flatten != 
np.nd.flatten
URL: https://github.com/apache/incubator-mxnet/pull/9748
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/src/operator/tensor/matrix_op.cc b/src/operator/tensor/matrix_op.cc
index 7439fb49d8..06478ca0d2 100644
--- a/src/operator/tensor/matrix_op.cc
+++ b/src/operator/tensor/matrix_op.cc
@@ -191,6 +191,9 @@ NNVM_REGISTER_OP(Flatten)
 For an input array with shape ``(d1, d2, ..., dk)``, `flatten` operation 
reshapes
 the input array into an output array of shape ``(d1, d2*...*dk)``.
 
+Note that the bahavior of this function is different from 
numpy.ndarray.flatten,
+which behaves similar to mxnet.ndarray.reshape((-1,)).
+
 Example::
 
     x = [[


 

----------------------------------------------------------------
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:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to