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
BUG: ESPILON with np.finfo(float).eps outputs a TypeError #21460
Comments
This very much sounds like gh-21008, are you running a Python debugger or profiler there? I am a bit surprised that you would see the error in a Python shell with only those two lines of code, can you try that? Right now, I would assume that this is in an IPython cell and other code (e.g. There is a 1.21.4 release plans with a fix included, right now we are waiting on cython unfortunately. Cython did fix this already though. EDIT: To be clear, the NumPy release will fix only the use caused by using |
To be clear – assuming this is the issue – the only good work-around is to avoid "tracing", or avoiding Python 3.10 for another few weeks (and then installing all the latest bug-fix releases). One way to check for tracing may be to do:
If this does not return
which may help, but I don't think a normal Python session should have it enabled to begin with (unless you are enabling debugging). |
Hi back, You are right, I was using the IPython of the Spyder IDE. Then, I tested two solutions: (2022_deepl) C:\Users\ME>python
It is working well ... Python 3.10.4 (tags/v3.10.4:9d38120, Mar 23 2022, 23:13:41) [MSC v.1929 64 bit (AMD64)] IPython 7.33.0 -- An enhanced Interactive Python. As we can see, we are all ok. I decide then to run my script (from Spyder) and I have this: Traceback (most recent call last): Then, I run in the IPython of Spyder, and the issue comes back. Traceback (most recent call last): During handling of the above exception, another exception occurred: I agree with you. I will forward this to the different packages (Spyder and Scikit-learn at least). Sorry for the inconvenience! |
Ohhh, if Spyder installs tracing functions by default, than this may be a pretty pressing thing :/. I don't think Spyder uses Cython, so they are probably fine, here. I pinged Thomas from sklearn, probably good enough :). |
Thanks for the report and following up quickly! I will close this, since there is a duplicate and fixing it is already on the horizon. |
Describe the issue:
Hi,
I have recently created a new python environment using the 3.10.4 python version.
I have installed the latest public version (1.22.3) and when I am trying to catch the epsilon, I have an error that cannot allow me to use the command: numpy.finfo(float).eps or numpy.finfo(numpy.float32).eps
This can be very inconvenient because I hwill use some solutions of Scikit-Learn that calls this.
Sorry for the inconvenience. Best.
Reproduce the code example:
Error message:
NumPy/Python version information:
1.22.3 3.10.4 (tags/v3.10.4:9d38120, Mar 23 2022, 23:13:41) [MSC v.1929 64 bit (AMD64)]
The text was updated successfully, but these errors were encountered: