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
There is a type compatibility issue with if_else depending on the origin of the boolean used. Consider b.if_else(a, c). If b is derived from a comparison between nada dsl base types (Integer, SecretInteger, PublicInteger, etc) and a and c are rational types, the operation b.if_else(a, c) throws the following error:
raise TypeError(f"Invalid operation: {self}.IfElse({arg_0}, {arg_1})")
TypeError: Invalid operation: SecretBoolean(inner=<nada_dsl.operations.GreaterThan object at 0x7f8df2fd18d0>).IfElse(<nada_numpy.types.SecretRational object at 0x7f8df2fd1480>, <nada_numpy.types.SecretRational object at 0x7f8df2fd1600>)
Desired behaviour: SecretBoolean should be used independently from how it was generated.
How to reproduce
In the program below, option 1 throws the above error when running nada build. Option 2 works fine.
Bug description
There is a type compatibility issue with
if_else
depending on the origin of the boolean used. Considerb.if_else(a, c)
. Ifb
is derived from a comparison between nada dsl base types (Integer
,SecretInteger
,PublicInteger
, etc) anda
andc
are rational types, the operationb.if_else(a, c)
throws the following error:Desired behaviour:
SecretBoolean
should be used independently from how it was generated.How to reproduce
In the program below, option 1 throws the above error when running
nada build
. Option 2 works fine.The text was updated successfully, but these errors were encountered: