Skip to content

Use is_binned property instead of bins is [not] None#701

Merged
jl-wynen merged 1 commit into
mainfrom
replace-bins-is-none
May 18, 2026
Merged

Use is_binned property instead of bins is [not] None#701
jl-wynen merged 1 commit into
mainfrom
replace-bins-is-none

Conversation

@jl-wynen
Copy link
Copy Markdown
Member

Working towards scipp/scipp#3790

@jl-wynen jl-wynen requested a review from SimonHeybrock May 18, 2026 10:02


def elem_unit(var: VariableLike) -> sc.Unit:
return var.bins.unit if var.bins is not None else var.unit
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Did you also grep for bins is None?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I searched for .bins is and there only seem to be these negative checks.

@jl-wynen jl-wynen merged commit 7be4f06 into main May 18, 2026
5 checks passed
@jl-wynen jl-wynen deleted the replace-bins-is-none branch May 18, 2026 12:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants