From 43ecbdc95a09e85f570bb7ce530da72ad78d9cc5 Mon Sep 17 00:00:00 2001 From: Yaroslav Halchenko Date: Fri, 5 Oct 2018 11:27:55 -0400 Subject: [PATCH] Provide information about what kind is actually not integer kind Otherwise it is hard to impossible to figure out what is the actual value which fails the test. See e.g. failing on 3.4 (only) tests of nibabel: https://ci.appveyor.com/project/nipy/nibabel/build/1.0.498/job/eechfm1kxroa0rju#L598 --- numpy/core/getlimits.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/numpy/core/getlimits.py b/numpy/core/getlimits.py index e450a660da59..0e3c58793ddc 100644 --- a/numpy/core/getlimits.py +++ b/numpy/core/getlimits.py @@ -513,7 +513,7 @@ def __init__(self, int_type): self.bits = self.dtype.itemsize * 8 self.key = "%s%d" % (self.kind, self.bits) if self.kind not in 'iu': - raise ValueError("Invalid integer data type.") + raise ValueError("Invalid integer data type %r." % (self.kind,)) def min(self): """Minimum value of given dtype."""