Open
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1061 +/- ##
=======================================
Coverage 66.23% 66.23%
=======================================
Files 89 89
Lines 17064 17064
Branches 2642 2642
=======================================
Hits 11303 11303
Misses 5021 5021
Partials 740 740
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
61d5159 to
4071122
Compare
Collaborator
|
I thought we had fixed this already... |
Collaborator
Author
|
My apologies @ColmTalbot I may have missed your MR that fixed it. If that is the case, please do close this |
Collaborator
|
Agreed on the call we would backport this to 2.7.x |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue
GitHub #1047
sample_subset_constrainedraised aTypeErrorwhen sampling withsize=Noneorsize=1:Root Cause
evaluate_constraintsreturns a numpy array vianp.ones_like. When sampling a single point, this is a 1-element array rather than a scalar. The subsequentint(is_valid)call on line 464 fails becauseint()only accepts 0-dimensional arrays.Fix
Wrap
is_validwithnp.squeezebefore converting toint, reducing the 1-element array to a 0-d scalar: