Skip to content

Replaced scipy array by numpy array in dendrogram #4487

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

Merged
merged 1 commit into from
Jan 25, 2024

Conversation

HugoDelatte
Copy link
Contributor

With new version of scipy 1.12, scipy.array fail with AttributeError: Module 'scipy' has no attribute 'array'.
I've simply replaced scipy.array by numpy.array.

Code PR

  • I have read through the contributing notes and understand the structure of the package. In particular, if my PR modifies code of plotly.graph_objects, my modifications concern the codegen files and not generated files.
  • I have added tests (if submitting a new feature or correcting a bug) or
    modified existing tests.
  • For a new feature, I have added documentation examples in an existing or
    new tutorial notebook (please see the doc checklist as well).
  • I have added a CHANGELOG entry if fixing/changing/adding anything substantial.
  • For a new feature or a change in behaviour, I have updated the relevant docstrings in the code to describe the feature or behaviour (please see the doc checklist as well).

-->

Copy link
Collaborator

@alexcjohnson alexcjohnson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💃 Thanks! A little frustrating that this was removed in a minor release with no changelog note but this certainly looks like the correct solution.

@Coding-with-Adam
Copy link
Contributor

Thank you for the PR, @HugoDelatte . The community's contributions to our open source libraries are a big reason Plotly and Dash are so popular.

If you have the time to tackle other issues, we would be thrilled 🤗

@asoltis
Copy link

asoltis commented Feb 9, 2024

Thank you for this. I noticed that this fix is not available with the latest release on pypi (also listed as version 5.18.0 from last October), which came up when troubleshooting with a colleague using the latest scipy.

@Coding-with-Adam
Copy link
Contributor

hi @asoltis
Can you please share your code that throws an error?

I just the code from issue number 4495, and it seemed to work for me.

@asoltis
Copy link

asoltis commented Feb 12, 2024

Adam,

I was just saying I noticed that the fix referenced in this thread is not available in the plotly release currently available through pypi, thus upgrading plotly through pip did not fix the issue (we downgraded scipy to get it to work, as referenced in your linked thread). I imagine this will be included with a new plotly release, but I was commenting that it is not currently part of the available pypi package.

@Coding-with-Adam
Copy link
Contributor

hi @asoltis
This should now be available in the new Plotly v5.19.0. Try it out and let us know if it doesn't work.

@asoltis
Copy link

asoltis commented Feb 15, 2024

@Coding-with-Adam

I just gave the new v5.19.0 a try and can confirm that the dendrogram function ran successfully with scipy 1.12.0 installed. Thanks!

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

Successfully merging this pull request may close these issues.

4 participants