Skip to content

fix(utils): correct nomask check in take_looks#733

Open
scottstanie wants to merge 1 commit into
isce-framework:mainfrom
scottstanie:fix-take-looks-nomask
Open

fix(utils): correct nomask check in take_looks#733
scottstanie wants to merge 1 commit into
isce-framework:mainfrom
scottstanie:fix-take-looks-nomask

Conversation

@scottstanie

Copy link
Copy Markdown
Contributor

Summary

take_looks guarded its masked-input branch with
arr.mask.ndim == np.ma.nomask, which compares an integer (ndim) against the
nomask sentinel (np.False_). That comparison is essentially always False,
so the intended "no mask present" shortcut never triggered.

Change

Use the correct identity check: arr.mask is np.ma.nomask.

🤖 Generated with Claude Code

`take_looks` guarded the masked-input path with
`arr.mask.ndim == np.ma.nomask`, comparing an int (`ndim`) against the
`nomask` sentinel (which is `np.False_`) -- so the branch never behaved
as intended. Use the identity check `arr.mask is np.ma.nomask`.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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