Skip to content

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

Open
quant12345 wants to merge 1 commit intoData-Centric-AI-Community:developfrom
quant12345:fix-issue-1688
Open

fix: issue1688 is not None to avoid the error#1750
quant12345 wants to merge 1 commit intoData-Centric-AI-Community:developfrom
quant12345:fix-issue-1688

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