Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Limit : Raise NotImplemented error when limit approaches zoo #14458

Merged
merged 4 commits into from
Mar 13, 2018

Conversation

jashan498
Copy link
Member

Fixes #14456

@@ -128,7 +128,9 @@ def __new__(cls, e, z, z0, dir="+"):
z = sympify(z)
z0 = sympify(z0)

if z0 is S.Infinity:
if z0 is S.ComplexInfinity:
raise NotImplementedError()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not the right place for this. The construction of an inert Limit object should not raise a NotImplementedError. The user isn't asking SymPy to compute the limit. The Limit object may be needed to express some logic in a formula, to be returned to a user, or to be processed by a user-written complex-limit-evaluating function.

What is not implemented is the evaluation of such limits, and that is in the doit method.

@@ -163,6 +163,9 @@ def doit(self, **hints):

e, z, z0, dir = self.args

if z0 is S.ComplexInfinity:
raise NotImplementedError()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There should be some text in NotImplementedError, otherwise how will the user know that the problem is with zoo and not with something else in the formula (like, in the expression e)? For example, NotImplementedError("Limits at complex infinity are not implemented")

@normalhuman normalhuman merged commit 340a754 into sympy:master Mar 13, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants