kohillyang opened a new issue #11915: the behavior of np.zeros_like(x) if x is 
a NDArray is unexpected.
URL: https://github.com/apache/incubator-mxnet/issues/11915
 
 
   ```python
   import numpy as np
   import mxnet.ndarray as nd
   import mxnet as mx
   print(mx.__version__)
   x = nd.zeros(shape=(17,5))
   print(x.shape)
   print(np.zeros_like(x).shape)
   print(type(x))
   print(nd.zeros_like(x).shape)
   ```
   The output is:
   ```bash
   1.2.0
   (17, 5)
   (17, 5, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 
1, 1, 1, 1, 1, 1, 1)
   <class 'mxnet.ndarray.ndarray.NDArray'>
   (17, 5)
   ```
   which may be a little confusing.

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


With regards,
Apache Git Services

Reply via email to