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
Being able to compile functions dynamically with non-primitive default values is tricky. It is currently being done in get_signature_string. If a non-primitive symbol is seen in the default values it is added to the eval dict. Maybe there is something in your example that does not work with this mechanism, I'll have a look.
Oh I see, I was assuming that allint, str, float, bool have a repr that is directly understandable by the compiler. However this is not the case for inf, -inf and nan.
I remove float from the types that are assumed safe. I take this opportunity to add bytes to the ones that are assumed safe.
Activity
smarie commentedon Mar 16, 2021
Thanks for the feedback @zhqu1148980644 ! This can also be reproduced using
@wraps:Being able to compile functions dynamically with non-primitive default values is tricky. It is currently being done in
get_signature_string. If a non-primitive symbol is seen in the default values it is added to the eval dict. Maybe there is something in your example that does not work with this mechanism, I'll have a look.smarie commentedon Mar 16, 2021
Oh I see, I was assuming that all
int,str,float,boolhave areprthat is directly understandable by the compiler. However this is not the case forinf,-infandnan.I remove
floatfrom the types that are assumed safe. I take this opportunity to addbytesto the ones that are assumed safe.smarie commentedon Mar 16, 2021
Fixed in 1.11.1, let me know if the fix works for you !
zqbake commentedon Mar 16, 2021
Thanks, it worked.