Skip to content

Redundant list comprehension can be replaced using generator #10454

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
Jun 27, 2025

Conversation

DimitriPapadopoulos
Copy link
Contributor

  • Closes #xxxx
  • Tests added
  • User visible changes (including notable bug fixes) are documented in whats-new.rst
  • New functions/methods are listed in api.rst

@max-sixty max-sixty merged commit c12edb2 into pydata:main Jun 27, 2025
33 checks passed
@max-sixty
Copy link
Collaborator

max-sixty commented Jun 27, 2025

thanks for these!

btw @DimitriPapadopoulos if you might be up for doing some more code refinements: the warnings that spew into the Files changed would be great to fix:

NumPy will stop allowing conversion of out-of-bound Python integers to integer arrays.  The conversion of 255 to int8 will fail in the future.
For the old behavior, usually:
    np.array(value).astype(dtype)`
will give the desired result (the cast overflows).

and

invalid value encountered in cast

they're a bit more involved that your previous changes, but I think at least one of them would be tractable — find a test that generates them, try and reproduce the warning, and understand what causes it. for example, I'm guessing somewhere for the first one, our tests are passing in numbers that are too high when we're testing an int8 array...

an alternative would just be limiting the test runs that print warnings to GH to only the core ones, so at least we don't get 10x the messages...

(no obligation ofc, only if you feel interested + want to help out; thank you either way!)

@DimitriPapadopoulos DimitriPapadopoulos deleted the PYL-R1728 branch June 28, 2025 06:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy