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
scipy.stats.pearsonr conflict with matplotlib #13035
Comments
@FarnoodF, could you include an example that shows exactly how you get a |
@WarrenWeckesser Thanks for the reply. |
I switched my numpy to 1.18.4, and tried again. I'm on Mac OSX, with Python 3.8.3 installed with Miniconda, and with numpy 1.18.4, scipy 1.5.3, and matplotlib 3.3.2 installed with pip (not conda). With or without the Can anyone else reproduce the problem reported here? |
Windows Conda Python 3.8.3 SciPy 1.5.0 Numpy 1.18.5 Matplotlib 3.2.2 No |
No `Nan's in python 3.7.3, 3.8.3 and 3.8.6 on macOS (Catalina 10.15.7) Scipy/Numpy set to 3.7.3 - @FarnoodF what is your Matplotlib version? Let's check with that too. Actually, could you possibly paste the output of
Explanation: Quietly upgrade pip, if successful quietly install pip-chill, if successful run pip-chill verbosely and drop lines which contain |
Thank you guys, My And here is the
|
I can confirm that it works fine (aka no |
Hi @FarnoodF, are you sure this is a SciPy issue? Can you please post the output of:
Here I'm copying the arrays to see if they're being changed in a way that we can detect. |
Hi @mdhaber ,
|
I'm so sorry @FarnoodF but I made typos in important places: I've corrected the code above and would appreciate it if you'd give it another shot. However, we already see something bizarre. If you are motivated to find the problem, you could add breakpoints to the |
Thank you @mdhaber, I will definitely dig more into it very soon. As you pointed out something bizarre is happening. It is only the matter of where I place the |
Which version and build of Windows are you using? There have been problems reported using Windows 10 build 2004 (see, for example, numpy/numpy#16744). |
@WarrenWeckesser |
So do we think this is a NumPy issue, @WarrenWeckesser? |
Actually, it is apparently a Windows issue that shows up in NumPy. According to the latest comment in the NumPy issue, the problem should be fixed when an update to Windows is released. I'm closing the issue, but if anyone prefers to keep this SciPy issue open until we're sure the Windows update fixes the problem, feel free to reopen it. |
Calculating two pearsonrs and then plotting the arrays using matplotlib and adding
ylim
forces the first pearsonr tonan
.Reproducing code example:
Scipy/Numpy/Python version information:
The text was updated successfully, but these errors were encountered: