Skip to content

Conversation

f380cedric
Copy link
Contributor

NpzFile inherits from collections.abc.Mapping,
which provides __contains__().
However, it calls __getitem__(),
which can be slow because it performs file decompression on success.

NpzFile inherits from collections.abc.Mapping,
which provides __contains__().
However, it calls __getitem__(),
which can be slow because it performs file decompression on success.
@charris charris merged commit 54e4dbe into numpy:main Apr 25, 2023
@charris
Copy link
Member

charris commented Apr 25, 2023

Thanks @f380cedric .

@charris charris changed the title EHN: add __contains__() to np.lib.npyio.NpzFile ENH: add __contains__() to np.lib.npyio.NpzFile Apr 25, 2023
@charris
Copy link
Member

charris commented Apr 25, 2023

Oops, I was a bit hasty. @f380cedric can you make PR adding a release note for this? See doc/release/upcoming_changes for other release notes to see how it is done.

@f380cedric
Copy link
Contributor Author

Yes, sure! I misunderstood the contribution doc, sorry for that.

@InessaPawson
Copy link
Member

Hi-five on merging your first pull request to NumPy, @f380cedric! We hope you stick around! Your choices aren’t limited to submitting PRs – you can help us stay on top of new and old issues, develop educational material, work on our website, add or improve graphic design, create marketing materials, translate website content, write grant proposals, and help with other fundraising initiatives. For more info, check out: https://numpy.org/contribute
Also, consider joining our mailing list. This is a great way to connect with other cool people in our community and be part of important conversations that affect the development of NumPy: https://mail.python.org/mailman/listinfo/numpy-discussion

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

Successfully merging this pull request may close these issues.

4 participants