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

Commit

Permalink
add exception for invalid inputs
Browse files Browse the repository at this point in the history
  • Loading branch information
Hao Jin committed Jun 22, 2018
1 parent 6f8466a commit f823c3d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion python/mxnet/ndarray/ndarray.py
Original file line number Diff line number Diff line change
Expand Up @@ -3771,5 +3771,5 @@ def histogram(a, bins=10, range=None):
res, bin_bounds = np.histogram(a.asnumpy(), bins=bins)
return array(res), array(bin_bounds)
return _internal._histogram(data=a, bin_cnt=bins, range=range)
return None
raise ValueError("bins argument should be either an integer or an NDArray")
# pylint: enable= no-member, protected-access, redefined-builtin

0 comments on commit f823c3d

Please sign in to comment.