Skip to content

fix: issue1688 is not None to avoid the error #1750

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

quant12345
Copy link
Contributor

@quant12345 quant12345 commented Apr 8, 2025

fix: issue #1688

When using a conditional operator on an array, an attempt is made to interpret the array as a logical value. is not None allows you to skip the logical context check.

Reproducing the error:

import numpy as np


weights = np.array([1, 2, 3])
if weights:
    pass

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