| Server IP : 35.80.110.71 / Your IP : 216.73.216.221 Web Server : Apache/2.4.58 (Ubuntu) System : Linux ip-172-31-21-44 6.17.0-1019-aws #19~24.04.1-Ubuntu SMP Tue Jun 23 18:53:06 UTC 2026 x86_64 User : ubuntu ( 1000) PHP Version : 8.3.31 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : OFF Directory : /lib/python3/dist-packages/sympy/holonomic/ |
Upload File : |
""" Common Exceptions for `holonomic` module. """
class BaseHolonomicError(Exception):
def new(self, *args):
raise NotImplementedError("abstract base class")
class NotPowerSeriesError(BaseHolonomicError):
def __init__(self, holonomic, x0):
self.holonomic = holonomic
self.x0 = x0
def __str__(self):
s = 'A Power Series does not exists for '
s += str(self.holonomic)
s += ' about %s.' %self.x0
return s
class NotHolonomicError(BaseHolonomicError):
def __init__(self, m):
self.m = m
def __str__(self):
return self.m
class SingularityError(BaseHolonomicError):
def __init__(self, holonomic, x0):
self.holonomic = holonomic
self.x0 = x0
def __str__(self):
s = str(self.holonomic)
s += ' has a singularity at %s.' %self.x0
return s
class NotHyperSeriesError(BaseHolonomicError):
def __init__(self, holonomic, x0):
self.holonomic = holonomic
self.x0 = x0
def __str__(self):
s = 'Power series expansion of '
s += str(self.holonomic)
s += ' about %s is not hypergeometric' %self.x0
return s