Skip to content

Avoid using flat_np_view for value assignment.#759

Merged
riga merged 2 commits intomasterfrom
fix/flat_view_assigments
Nov 14, 2025
Merged

Avoid using flat_np_view for value assignment.#759
riga merged 2 commits intomasterfrom
fix/flat_view_assigments

Conversation

@riga
Copy link
Copy Markdown
Member

@riga riga commented Nov 14, 2025

Right now, we make use of a pattern for in-place value assignment into ak arrays by using a np (view) representation of the flatten ak array.

However, under many conditions, this assignment fails silently, which is dangerous and error prone. For the assignment to work,

  • columns types should not contain optionals (e.g. ?float32), and
  • the original arrays must not be the immediate result of a masking (which is the case very often).

Therefore, we need to avoid any use of this pattern throughout the framework, which is achieved by this PR.

@riga riga requested a review from mafrahm November 14, 2025 09:56
@riga riga self-assigned this Nov 14, 2025
@riga riga added the priority-high High priority stuff label Nov 14, 2025
@riga riga added the fix Fixes a bug label Nov 14, 2025
@riga riga moved this to In Progress in columnflow v0.3.1 Nov 14, 2025
@riga riga merged commit d645aab into master Nov 14, 2025
10 checks passed
@github-project-automation github-project-automation bot moved this from In Progress to Done in columnflow v0.3.1 Nov 14, 2025
@riga riga deleted the fix/flat_view_assigments branch November 14, 2025 15:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

fix Fixes a bug priority-high High priority stuff

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants