Skip to content

Commit

Permalink
Update hypothesis strategy for continuous linear inequalities
Browse files Browse the repository at this point in the history
  • Loading branch information
AVHopp committed Jan 9, 2025
1 parent 19bb68c commit 6bab2c2
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tests/hypothesis_strategies/constraints.py
Original file line number Diff line number Diff line change
Expand Up @@ -236,12 +236,15 @@ def continuous_linear_constraints(
)
)
rhs = draw(finite_floats())
is_interpoint = draw(st.booleans())

# Optionally add the operator
operators = operators or ["=", ">=", "<="]
operator = draw(st.sampled_from(operators))

return ContinuousLinearConstraint(parameter_names, operator, coefficients, rhs)
return ContinuousLinearConstraint(
parameter_names, operator, coefficients, rhs, is_interpoint
)


continuous_linear_equality_constraints = partial(
Expand Down

0 comments on commit 6bab2c2

Please sign in to comment.