You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Getting the wrong exception type when expression uses all
Expect to get an CELEvalError but instead of a TypeError
import celpy
from celpy import CELEvalError
env = celpy.Environment()
# Press the green button in the gutter to run the script.
if __name__ == '__main__':
all_positive = "data.all(x, x>0)"
breaks = {'data_': [1, 2, 3] }
ast = env.compile(all_positive)
prgm = env.program(ast)
try:
prgm.evaluate(breaks)
except CELEvalError as ex:
print('Got an evaluation error')
except TypeError as ex:
print('Got a type error')
Happy to try and fix with some guidance
The text was updated successfully, but these errors were encountered:
Getting the wrong exception type when expression uses all
Expect to get an CELEvalError but instead of a TypeError
Happy to try and fix with some guidance
The text was updated successfully, but these errors were encountered: