Open fsaad opened 2 years ago
MWE
>>> source = """ i = 0.5 Y ~= bernoulli(p=0 if i == 0.5 else 1) """ >>> compiler = SPPL_Compiler(source) >>> namespace = compiler.execute_module() TypeError: unsupported operand type(s) for <<: 'float' and 'set'
The reason is that the generated Python is
# MODEL DEFINITION command = Sequence( Sample(Y, bernoulli(p=(0 if (i << {0.5}) else 1))), )
The offending line is here: https://github.com/probcomp/sppl/blob/8b0fe0c37ed15dd19936d13e0fa652c3b5237cac/src/compilers/sppl_to_python.py#L145
MWE
The reason is that the generated Python is
The offending line is here: https://github.com/probcomp/sppl/blob/8b0fe0c37ed15dd19936d13e0fa652c3b5237cac/src/compilers/sppl_to_python.py#L145