Skip to content
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.

Commit

Permalink
add error message
Browse files Browse the repository at this point in the history
  • Loading branch information
haojin2 committed Oct 31, 2019
1 parent 82dca7b commit 2094a36
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion python/mxnet/numpy/multiarray.py
Original file line number Diff line number Diff line change
Expand Up @@ -1996,7 +1996,8 @@ def array(object, dtype=None, ctx=None):
if isinstance(object, (ndarray, _np.ndarray)):
dtype = object.dtype if dtype is None else dtype
elif isinstance(object, NDArray):
raise ValueError("")
raise ValueError("If you're trying to create a mxnet.numpy.ndarray "
"from mx.nd.NDArray, please use the zero-copy as_np_ndarray function.")
else:
if dtype is None:
dtype = object.dtype if hasattr(object, "dtype") else _np.float32
Expand Down

0 comments on commit 2094a36

Please sign in to comment.