diff options
Diffstat (limited to 'numpy/lib/histograms.py')
-rw-r--r-- | numpy/lib/histograms.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/numpy/lib/histograms.py b/numpy/lib/histograms.py index ede8a26e4..f080cc392 100644 --- a/numpy/lib/histograms.py +++ b/numpy/lib/histograms.py @@ -417,9 +417,9 @@ def _get_bin_edges(a, bins, range, weights): elif np.ndim(bins) == 0: try: n_equal_bins = operator.index(bins) - except TypeError: + except TypeError as e: raise TypeError( - '`bins` must be an integer, a string, or an array') + '`bins` must be an integer, a string, or an array') from e if n_equal_bins < 1: raise ValueError('`bins` must be positive, when an integer') |