Skip to content

SWR matplotlib__matplotlib-17851 - #70

Open
richeshgupta wants to merge 3 commits into
swr-base-d3c674cfrom
swr-head-d3c674c
Open

richeshgupta wants to merge 3 commits into
swr-base-d3c674cfrom
swr-head-d3c674c

Conversation

@richeshgupta

Copy link
Copy Markdown

SWRBench case matplotlib__matplotlib-17851: pinned base 7ed6bc2 to head d3c674c of matplotlib#17851. Benchmark replay, not for merge.

@razorpay-slash razorpay-slash 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.

Automated code review

Reviewed up to d3c674c.
All 5 reviewers completed.

"""Convert paths from a collection object to 3D segments."""

zs = np.broadcast_to(zs, len(paths))
if not np.iterable(zs):

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

[MEDIUM] Iterable zs of unmatched length now silently truncates the collection, with no test exercising the boundary

Issue

The new guard passes any iterable zs straight into zip(paths, zs), which truncates at the shorter sequence: zs=[5] now renders only the first path where np.broadcast_to previously expanded it to every path, and wrong-length arrays that previously raised ValueError now silently drop paths. Both new tests pass exactly-matched zs (99 rows for 99 paths) or a scalar, so the length-mismatch boundary is never exercised.

Evidence

CONFIRMED: the removed np.broadcast_to(zs, len(paths)) raised ValueError on length mismatch and broadcast length-1 iterables to all paths, while zip(paths, zs) in the same hunk truncates to min(len(paths), len(zs)).

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

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants