From 81b7e83a5c46eb5c1473fb6595bd19ce85378583 Mon Sep 17 00:00:00 2001 From: Sheng Zha Date: Thu, 16 Jul 2020 21:37:40 -0700 Subject: [PATCH] fix intc mapping on windows --- python/mxnet/numpy/multiarray.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/python/mxnet/numpy/multiarray.py b/python/mxnet/numpy/multiarray.py index 17c549193324..5274408e4403 100644 --- a/python/mxnet/numpy/multiarray.py +++ b/python/mxnet/numpy/multiarray.py @@ -185,7 +185,8 @@ def _as_mx_np_array(object, ctx=None): if isinstance(object, ndarray): return object elif isinstance(object, _np.ndarray): - return array(object, dtype=object.dtype, ctx=ctx) + np_dtype = _np.dtype(object.dtype).type + return array(object, dtype=np_dtype, ctx=ctx) elif isinstance(object, (integer_types, numeric_types)): return object elif isinstance(object, (list, tuple)):