summaryrefslogtreecommitdiff
path: root/numpy/core/numeric.py
diff options
context:
space:
mode:
Diffstat (limited to 'numpy/core/numeric.py')
-rw-r--r--numpy/core/numeric.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/numpy/core/numeric.py b/numpy/core/numeric.py
index 0b728f804..756c426f7 100644
--- a/numpy/core/numeric.py
+++ b/numpy/core/numeric.py
@@ -2232,6 +2232,8 @@ def base_repr(number, base=2, padding=0):
digits = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ'
if base > len(digits):
raise ValueError("Bases greater than 36 not handled in base_repr.")
+ elif base < 2:
+ raise ValueError("Bases less than 2 not handled in base_repr.")
num = abs(number)
res = []