Skip to content

MAINT: Remove surviving and unused list comprehension from _polybase #11842

@jeffyancey

Description

@jeffyancey

Lines 320 to 325 of numpy/polynomial/_polybase.py contains the following code:

        # filter out uninteresting coefficients
        filtered_coeffs = [
            (i, c)
            for i, c in enumerate(self.coef)
            # if not (c == 0)  # handle NaN
        ]

A few things to note:

  1. the comment no longer describes what the comprehension does
  2. the conditional is commented out
  3. resulting list is never used

Looks like this is just some leftover code from a prior implementation that has caused no problems, as so has been overlooked.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions