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
NameError: name '' not defined #21987
Comments
Hey @manethedane, thanks for reporting. I have a quick question for you: did you define your |
Hi, no I defined my function in the editor and ran the other code from the
console. That's what I've always been doing with other files and it's never
been a problem.
Thanks for the quick response.
…On Wed, Apr 10, 2024, 22:43 Carlos Cordoba ***@***.***> wrote:
Hey @manethedane <https://github.com/manethedane>, thanks for reporting.
I have a quick question for you: did you define your gaussian_likelihood
function in the console and then run your other code from the editor?
—
Reply to this email directly, view it on GitHub
<#21987 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/BHXPMYORKLBFC74IENEY223Y4WP5VAVCNFSM6AAAAABGBA66C2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANBYGQYDEOJXGM>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Ok, thanks for clarification. Could you upload a screenshot to see how you're running your code? Please be aware that you can't send images via email. Instead, you need to drag and drop them directly here, on the Github website. |
Thanks @manethedane! Although it's not visible, I think you the first command you ran in the console was import numpy as np If that was the case, then it means you didn't run the code you have in the editor before trying to call So, all you need to do before running x = np.array([1,2,4,0])
gaussian_likelihood(0.34,np.var(x),x) is pressing Let us know if that solves the problem for you. |
Description
What steps will reproduce the problem?
Define a function, eg:
Then attempt to execute the function in console, eg:
Will get NameError: name 'gaussian_likelihood' is not defined.
Code works fine when run by other people/devices.
Versions
Dependencies
The text was updated successfully, but these errors were encountered: