zhreshold commented on a change in pull request #12677: [MXNET-995] Constant Initializer for ND Array URL: https://github.com/apache/incubator-mxnet/pull/12677#discussion_r220793334
########## File path: python/mxnet/ndarray/ndarray.py ########## @@ -2479,6 +2479,8 @@ def array(source_array, ctx=None, dtype=None): if isinstance(source_array, NDArray): dtype = source_array.dtype if dtype is None else dtype else: + if isinstance(source_array, (float, int)): Review comment: my concern here is that you implicitly converted 0-d array(constant) to 1-d array here, which may not be very appropriate ---------------------------------------------------------------- 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