Fix warnings in examples/neighbors/plot_nca_illustration.py #14117 #14151
Fix warnings in examples/neighbors/plot_nca_illustration.py #14117 #14151glemaitre merged 10 commits intoscikit-learn:masterfrom rodneyosodo:examples/neighbors/plot_nca_illustration
Conversation
|
I think you forgot to create a new branch for this PR. It shows the changes to the other file as well. |
|
you also have failing tests |
I had created a different branch the issue was length of the line and whitespaces |
|
It doesn't look like the errors are related to your PR, you can ignore them I think, and just fix the unrelated changes in this PR. |
I have fixed the unrelated changes 👍 |
| line = ([pt_i[0], pt_j[0]], [pt_i[1], pt_j[1]]) | ||
| ax.plot(*line, c=cm.Set1(y[j]), | ||
| linewidth=5*thickness[j]) | ||
| ax.plot(*line, c=cm.Set1(y[j]), linewidth=5*thickness[j]) |
There was a problem hiding this comment.
This doesn't use np.array. Why is the change not needed here?
There was a problem hiding this comment.
For the y array it accepts without any warnings but for the x one it refuses
There was a problem hiding this comment.
You don't need this change (it is only in scatter plot)
|
I don't get the warning in the last matplotlib version (i.e., 3.1.0) |
matplotlib 3.1.0 |
|
Oh, I execute the wrong file ;). You are right the warning is there. |
|
I pushed the fix for older matplotlib version normally |
|
@0x6f736f646f Thanks for your contribution |
|
You are welcomed |
I was able to fix the warnings try transforming the colour argument to an array. It was intially a tuple
The error was
Before the change
After the change
The plotting still remains the same
#WiDSML
@adrinjalali