Skip to content

fix the Box indicator function - #228

Merged
mrava87 merged 2 commits into
PyLops:devfrom
tttamaki:dev_box_bugfix
Sep 8, 2025
Merged

mrava87 merged 2 commits into
PyLops:devfrom
tttamaki:dev_box_bugfix

Conversation

@tttamaki

@tttamaki tttamaki commented Sep 6, 2025 •

Copy link
Copy Markdown
Contributor

I found a small bug.

  • old: (x > self.lower) & (x < self.upper)
  • fix: (x >= self.lower) & (x <= self.upper)

Also I added a test for this.

- old: (x > self.lower) & (x < self.upper): this is an open set, which violates the assumption of the convex projection
- fix (x >= self.lower) & (x <= self.upper): this is a closed convex set.

also add a test for this logic.
@tttamaki
tttamaki marked this pull request as ready for review September 6, 2025 07:37
@mrava87
mrava87 self-requested a review September 7, 2025 12:51
Comment thread pytests/test_projection.py Outdated
 - move and change lines  to be consistent with other tests
@tttamaki
tttamaki requested a review from mrava87 September 8, 2025 02:59
@mrava87
mrava87 merged commit 54ac074 into PyLops:dev Sep 8, 2025
8 checks passed
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.

2 participants