Skip to content

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

Closed
quant12345 wants to merge 2 commits into
Data-Centric-AI-Community:developfrom
quant12345:fix-issue-1688
Closed

fix: issue1688 is not None to avoid the error#1750
quant12345 wants to merge 2 commits into
Data-Centric-AI-Community:developfrom
quant12345:fix-issue-1688

Conversation

@quant12345

@quant12345 quant12345 commented Apr 8, 2025

Copy link
Copy Markdown
Contributor

Close #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

@quant12345 quant12345 closed this Jun 20, 2026
@quant12345

Copy link
Copy Markdown
Contributor Author

Closing this as the logic has changed and the issue is no longer relevant.

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.

plot.histogram.max_bins setting error

1 participant