boofun.utils.exceptions.InvalidInputError
- exception boofun.utils.exceptions.InvalidInputError(message: str, code: ErrorCode | None = None, parameter: str | None = None, received: Any = None, expected: str | None = None, context: Dict[str, Any] | None = None, suggestion: str | None = None)[source]
Raised when function arguments are invalid.
- Raised By:
bf.BooleanFunction.evaluate() with empty or wrong-type inputs
bf.BooleanFunction.fix() with invalid variable index or value
bf.BooleanFunction.noise_stability() with rho outside [-1, 1]
Any method receiving out-of-range parameters
- Error Codes:
E1100: Generic invalid input E1101: Invalid parameter value E1102: Invalid parameter type E1103: Parameter out of range E1104: Empty input
Example
>>> f = bf.create([0, 1, 1, 0]) >>> f.fix(0, 5) # Raises InvalidInputError (value must be 0 or 1)