Skip to content

Convert TensorFlow to numpy for plots - #28083

Merged
oscargus merged 3 commits into
matplotlib:mainfrom
jonas-eschle:je_convert_tf_to_numpy
Apr 25, 2024
Merged

oscargus merged 3 commits into
matplotlib:mainfrom
jonas-eschle:je_convert_tf_to_numpy

Conversation

@jonas-eschle

@jonas-eschle jonas-eschle commented Apr 15, 2024 •

Copy link
Copy Markdown
Contributor

PR summary

as mentioned in #22879 (comment), adding support for TensorFlow tensors to be converted to numpy (equivalent to what was done for JAX and torch in #25887)

Also improved previous handling by using np.asarray and allow the specific subset of arrays (JAX, torch, TF) to also use more efficient methods if desired (see also https://numpy.org/devdocs/user/basics.interoperability.html#using-arbitrary-objects-in-numpy).

PR checklist

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Thank you for opening your first PR into Matplotlib!

If you have not heard from us in a week or so, please leave a new comment below and that should bring it to our attention. Most of our reviewers are volunteers and sometimes things fall through the cracks.

You can also join us on gitter for real-time discussion.

For details on testing, writing docs, and our review process, please see the developer guide

We strive to be a welcoming and open project. Please follow our Code of Conduct.

@jonas-eschle

Copy link
Copy Markdown
Contributor Author

These failures seem to be independent and more fundamental with dependencies, I'll gonna wait them out to be fixed, feel free to review

@tacaswell tacaswell added this to the v3.10.0 milestone Apr 16, 2024
@tacaswell
tacaswell requested a review from oscargus April 16, 2024 16:39
@tacaswell

Copy link
Copy Markdown
Member

yeah, the appveyor failure is unrelated.

@oscargus

Copy link
Copy Markdown
Member

Thanks!

@oscargus
oscargus merged commit a3ccdfb into matplotlib:main Apr 25, 2024
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.

3 participants