Status: Accepted
Owner: ----
Labels: Type-Defect Priority-Medium Series

New issue 3157 by asmeu...@gmail.com: limit() of hypergeometric function does not work
http://code.google.com/p/sympy/issues/detail?id=3157

In [78]: print a
-2*hyper((1/2, 3/4), (3/2,), 2*exp_polar(I*pi)/(z - 1))/sqrt(z - 1)

In [79]: limit(a, z, 1)
---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
/Users/aaronmeurer/Documents/Python/sympy/sympy/<ipython-input-79-c904e4ed1ee2> in <module>()
----> 1 limit(a, z, 1)

/Users/aaronmeurer/Documents/Python/sympy/sympy/sympy/series/limits.pyc in limit(e, z, z0, dir)
    116             i, d = e.as_independent(z)
    117             if i is not S.One and i.is_bounded:
--> 118                 return i*limit(d, z, z0, dir)
    119         else:
    120             i, d = S.One, e

/Users/aaronmeurer/Documents/Python/sympy/sympy/sympy/series/limits.pyc in limit(e, z, z0, dir)
    192
    193     try:
--> 194         r = gruntz(e, z, z0, dir)
    195         if r is S.NaN:
    196             raise PoleError()

/Users/aaronmeurer/Documents/Python/sympy/sympy/sympy/series/gruntz.pyc in gruntz(e, z, z0, dir)
    690         else:
    691             raise NotImplementedError("dir must be '+' or '-'")
--> 692         r = limitinf(e0, z)
    693
694 # This is a bit of a heuristic for nice results... we always rewrite

/Users/aaronmeurer/Documents/Python/sympy/sympy/sympy/core/cache.pyc in wrapper(*args, **kw_args)
     89         except KeyError:
     90             pass
---> 91         func_cache_it_cache[k] = r = func(*args, **kw_args)
     92         return r
     93     return wrapper

/Users/aaronmeurer/Documents/Python/sympy/sympy/sympy/series/gruntz.pyc in limitinf(e, x)
    470         e = e.subs(x, p)
    471         x = p
--> 472     c0, e0 = mrv_leadterm(e, x)
    473     sig = sign(e0, x)
    474     if sig == 1:

/Users/aaronmeurer/Documents/Python/sympy/sympy/sympy/core/cache.pyc in wrapper(*args, **kw_args)
     89         except KeyError:
     90             pass
---> 91         func_cache_it_cache[k] = r = func(*args, **kw_args)
     92         return r
     93     return wrapper

/Users/aaronmeurer/Documents/Python/sympy/sympy/sympy/series/gruntz.pyc in mrv_leadterm(e, x)
    553     w = Dummy("w", real=True, positive=True, bounded=True)
    554     f, logw = rewrite(exps, Omega, x, w)
--> 555     series = calculate_series(f, w, logx=logw)
556 series = series.subs(log(w), logw) # this should not be necessary
    557     return series.leadterm(w)

/Users/aaronmeurer/Documents/Python/sympy/sympy/sympy/series/gruntz.pyc in calculate_series(e, x, skip_abs, logx)
    506     f = e
    507     for n in [1, 2, 4, 6, 8, 16]:
--> 508         series = f.nseries(x, n=n, logx=logx)
    509         if not series.has(O):
    510             # The series expansion is locally exact.

/Users/aaronmeurer/Documents/Python/sympy/sympy/sympy/core/expr.pyc in nseries(self, x, x0, n, dir, logx)
   2343             return self.series(x, x0, n, dir)
   2344         else:
-> 2345             return self._eval_nseries(x, n=n, logx=logx)
   2346
   2347     def _eval_nseries(self, x, n, logx):

/Users/aaronmeurer/Documents/Python/sympy/sympy/sympy/core/mul.py in _eval_nseries(self, x, n, logx)
   1387     def _eval_nseries(self, x, n, logx):
   1388         from sympy import powsimp
-> 1389         terms = [t.nseries(x, n=n, logx=logx) for t in self.args]
1390 return powsimp(Mul(*terms).expand(), combine='exp', deep=True)
   1391

/Users/aaronmeurer/Documents/Python/sympy/sympy/sympy/core/expr.pyc in nseries(self, x, x0, n, dir, logx)
   2343             return self.series(x, x0, n, dir)
   2344         else:
-> 2345             return self._eval_nseries(x, n=n, logx=logx)
   2346
   2347     def _eval_nseries(self, x, n, logx):

/Users/aaronmeurer/Documents/Python/sympy/sympy/sympy/core/function.pyc in _eval_nseries(self, x, n, logx)
    415                 supported.'''))
    416         args = self.args
--> 417         args0 = [t.limit(x, 0) for t in args]
    418         if any(t.is_bounded == False for t in args0):
    419             from sympy import oo, zoo, nan

AttributeError: 'Tuple' object has no attribute 'limit'


--
You received this message because you are subscribed to the Google Groups 
"sympy-issues" group.
To post to this group, send email to sympy-issues@googlegroups.com.
To unsubscribe from this group, send email to 
sympy-issues+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sympy-issues?hl=en.

Reply via email to