diff options
author | Travis Oliphant <oliphant@enthought.com> | 2006-03-06 08:18:52 +0000 |
---|---|---|
committer | Travis Oliphant <oliphant@enthought.com> | 2006-03-06 08:18:52 +0000 |
commit | 4e8b56df4b82feaa624a6c45859d0420ee7b2112 (patch) | |
tree | f9111fdd4193bc206e8695b5c7e5ed6942e89513 /numpy/lib/getlimits.py | |
parent | f1fb5f8d6b3fe27dae96acd274fed9bafa8977c7 (diff) | |
download | numpy-4e8b56df4b82feaa624a6c45859d0420ee7b2112.tar.gz |
Ensure scalars in finfo
Diffstat (limited to 'numpy/lib/getlimits.py')
-rw-r--r-- | numpy/lib/getlimits.py | 10 |
1 files changed, 6 insertions, 4 deletions
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 |