Skip to content

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