I think there might be an issue with the input checking here, since an error is thrown if a weight is equal to the capacity (which should still be solvable) - the ExceptionError states that a weight is greater than the capacity, which is not the case (so perhaps equal to is being interpreted as greater than?).
If the param method_kwargs={'check_inputs': 0} is set, then the code runs fine, so the check inputs function seems to be the issue.
mknapsack/mknapsack/_subset_sum.py
Line 18 in c1cb903
I think there might be an issue with the input checking here, since an error is thrown if a weight is equal to the capacity (which should still be solvable) - the
ExceptionErrorstates that a weight is greater than the capacity, which is not the case (so perhaps equal to is being interpreted as greater than?).If the param
method_kwargs={'check_inputs': 0}is set, then the code runs fine, so the check inputs function seems to be the issue.