TaoLv opened a new issue #16402: Inconsistent behavior of calling dtype of NDArray URL: https://github.com/apache/incubator-mxnet/issues/16402 `mx.nd.dtype()` should either give the correct result or throw an error like in numpy. mxnet: ``` >>> a=mx.random.uniform(shape(3,4,5)) Traceback (most recent call last): File "<stdin>", line 1, in <module> NameError: name 'shape' is not defined >>> a=mx.random.uniform(shape=(3,4,5)) >>> a.dtype <class 'numpy.float32'> >>> a.dtype() 0.0 >>> b=mx.nd.cast(a, dtype='int32') >>> b.dtype <class 'numpy.int32'> >>> b.dtype() 0 ``` numpy: ``` >>> a=np.random.rand(3,4,5) >>> a.dtype dtype('float64') >>> a.dtype() Traceback (most recent call last): File "<stdin>", line 1, in <module> TypeError: 'numpy.dtype' object is not callable >>> b=a.astype('int32') >>> b.dtype dtype('int32') >>> b.dtype() Traceback (most recent call last): File "<stdin>", line 1, in <module> TypeError: 'numpy.dtype' object is not callable >>> ```
---------------------------------------------------------------- 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