[Scipy-svn] r3119 - trunk/Lib/special
scipy-svn at scipy.org
scipy-svn at scipy.org
Thu Jun 28 04:24:03 EDT 2007
Author: cookedm
Date: 2007-06-28 03:23:59 -0500 (Thu, 28 Jun 2007)
New Revision: 3119
Modified:
trunk/Lib/special/basic.py
Log:
Lib/special: Really replace some character codes with dtypes
Modified: trunk/Lib/special/basic.py
===================================================================
--- trunk/Lib/special/basic.py 2007-06-28 08:23:20 UTC (rev 3118)
+++ trunk/Lib/special/basic.py 2007-06-28 08:23:59 UTC (rev 3119)
@@ -25,10 +25,10 @@
x,n = asarray(x), asarray(n)
n = asarray(n + (x-x))
x = asarray(x + (n-n))
- if x.dtype.char in ['fFdD']:
- ytype = x.dtype.char
+ if issubdtype(x.dtype, inexact):
+ ytype = x.dtype
else:
- ytype = 'd'
+ ytype = float
y = zeros(x.shape,ytype)
mask1 = (n <= 0) | (n <> floor(n))
@@ -406,7 +406,7 @@
Limit as q->infinity of 1F1(q;a;z/q)
"""
z = asarray(z)
- if z.dtype.char in ['F', 'D']:
+ if issubdtype(z.dtype, complexfloating):
arg = 2*sqrt(abs(z))
num = where(z>=0, iv(v-1,arg), jv(v-1,arg))
den = abs(z)**((v-1.0)/2)
More information about the Scipy-svn
mailing list