From 4e8b56df4b82feaa624a6c45859d0420ee7b2112 Mon Sep 17 00:00:00 2001 From: Travis Oliphant Date: Mon, 6 Mar 2006 08:18:52 +0000 Subject: Ensure scalars in finfo --- numpy/lib/getlimits.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'numpy/lib/getlimits.py') diff --git a/numpy/lib/getlimits.py b/numpy/lib/getlimits.py index 921baebe2..776e2550c 100644 --- a/numpy/lib/getlimits.py +++ b/numpy/lib/getlimits.py @@ -75,13 +75,15 @@ class finfo(object): else: raise ValueError,`dtype` - for word in ['tiny', 'precision', 'resolution','iexp', - 'maxexp','minexp','epsneg','negep', + for word in ['precision', 'iexp', + 'maxexp','minexp','negep', 'machep']: setattr(self,word,getattr(machar, word)) - self.max = machar.huge + for word in ['tiny','resolution','epsneg']: + setattr(self,word,getattr(machar, word).squeeze()) + self.max = machar.huge.squeeze() self.min = -self.max - self.eps = machar.epsilon + self.eps = machar.epsilon.squeeze() self.nexp = machar.iexp self.nmant = machar.it self.machar = machar -- cgit v1.2.1