Skip to content

Fix type error in posterior_sampler.py by casting total_chains to int - #1770

Open
copybara-service[bot] wants to merge 1 commit into
mainfrom
test_963595971
Open

Fix type error in posterior_sampler.py by casting total_chains to int#1770
copybara-service[bot] wants to merge 1 commit into
mainfrom
test_963595971

Conversation

@copybara-service

Copy link
Copy Markdown

Fix type error in posterior_sampler.py by casting total_chains to int

np.sum() can return a NumPy scalar type (e.g., np.signedinteger) instead of a standard standard Python int.

This change explicitly casts total_chains to int at definition time to ensure type compatibility and fix build breakages.

np.sum() can return a NumPy scalar type (e.g., np.signedinteger) instead of a standard standard Python int.

This change explicitly casts total_chains to int at definition time to ensure type compatibility and fix build breakages.

PiperOrigin-RevId: 963595971
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