summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--scipy/base/numeric.py4
-rw-r--r--scipy/base/type_check.py5
2 files changed, 6 insertions, 3 deletions
diff --git a/scipy/base/numeric.py b/scipy/base/numeric.py
index 7b0b4fa32..b6142fb1f 100644
--- a/scipy/base/numeric.py
+++ b/scipy/base/numeric.py
@@ -380,8 +380,8 @@ def getbufsize(size):
seterr(where='builtin')
setbufsize(UFUNC_BUFSIZE_DEFAULT,where='builtin')
-inf = PINF
-nan = NAN
+Inf = inf = infty = Infinity = PINF
+nan = NaN = NAN
from oldnumeric import *
diff --git a/scipy/base/type_check.py b/scipy/base/type_check.py
index 9fcd7b41e..5fc44cbe4 100644
--- a/scipy/base/type_check.py
+++ b/scipy/base/type_check.py
@@ -10,7 +10,7 @@ import umath
__all__ = ['iscomplexobj','isrealobj','imag','iscomplex',
'isscalar',
'isreal','nan_to_num','real','real_if_close',
- 'typename','asfarray','mintypecode']
+ 'typename','asfarray','mintypecode','asscalar']
_typecodes_by_elsize = 'GDFgdfQqLlIiHhBb?'
@@ -128,6 +128,9 @@ def real_if_close(a,tol=100):
return a
+def asscalar(a):
+ return a.toscalar()
+
#-----------------------------------------------------------------------------
_namefromtype = {'S1' : 'character',