Skip to content

The fully_commutes_with_sum property was incorrectly using sum() on the flattened commuting structure, which does not yield a boolean. Changed to use all() to ensure the property returns True only if all sub-encoders fully commute with sum. Added type assertions in tests to verify the return type is boolean.#1286

Open
copybara-service[bot] wants to merge 1 commit into
masterfrom
test_915763952

Conversation

@copybara-service
Copy link
Copy Markdown

The fully_commutes_with_sum property was incorrectly using sum() on the flattened commuting structure, which does not yield a boolean. Changed to use all() to ensure the property returns True only if all sub-encoders fully commute with sum. Added type assertions in tests to verify the return type is boolean.

…on the flattened commuting structure, which does not yield a boolean. Changed to use `all()` to ensure the property returns True only if all sub-encoders fully commute with sum. Added type assertions in tests to verify the return type is boolean.

PiperOrigin-RevId: 915763952
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.

1 participant