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

"Expression is problematic. Please submit this as a bug." #24524

Closed
Kuratius opened this issue Jan 14, 2023 · 8 comments
Closed

"Expression is problematic. Please submit this as a bug." #24524

Kuratius opened this issue Jan 14, 2023 · 8 comments
Labels

Comments

@Kuratius
Copy link

Kuratius commented Jan 14, 2023

image

import sympy as sp
n=sp.Symbol('n')

def f(n):
    return 1/(1+sp.exp(-n))

T=50
x=sp.Symbol('x')

def expit(x):
    return sp.Sum(f(T*(x-n)),(n,0,3))

sp.plot(expit(x), (x,0,3))

@MohitKumar020291
Copy link

MohitKumar020291 commented Jan 15, 2023

Hello @Kuratius , the issue will be simply solved by using summation instead of sum.

@Kuratius
Copy link
Author

@MohitKumar020291 Please read the error message. You misunderstood why I opened this issue.

@MohitKumar020291
Copy link

MohitKumar020291 commented Jan 16, 2023

Thanks @Kuratius for your response. It is the problem because you have not imported expit() function , for importing it you should know that there should be a PYTHONPATH in which you must have a file defining expit() so , you are getting error because you are using it in jupyter notebook , these are general error when you use jupyter notebook as it does have all directories or file to progress.
secondly, failback method means your solution is not efficient , it does not means to inaccurate and it is showing your solution is not efficient because it has taken expit() for use from expit_module.py which is a user defined not inbuilt.
I hope that helps.
Please free to ask me and make me more correct.

@Kuratius
Copy link
Author

Kuratius commented Jan 16, 2023

You don't understand how python namespaces work.

Wait, are you using a chatbot to reply to this?

@MohitKumar020291
Copy link

@Kuratius Yes , I do not know Python namespaces even and using chatbot. Asking questions to AI is not a good practice? How did you get to know that , did you used it also?

@oscarbenjamin
Copy link
Contributor

Asking questions to AI is not a good practice?

No, it is not a good practice. Feel free to talk to the chatbot yourself but if you're going to talk to people on this platform then you should write messages yourself.

@oscarbenjamin
Copy link
Contributor

@Kuratius thanks for reporting this. This is a common problem and relates to the plotting module's use of experimental_lambdify rather than actual lambdify.

@SamLubelsky
Copy link
Contributor

This warning no longer appears because of the switch from experimental_lambdify to lambdify, looks like this issue can be safely closed.
Capture

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

6 participants