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_r220793152
########## 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: mx.base.numeric_types is better ---------------------------------------------------------------- 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