bryancatanzaro / copperhead

Data Parallel Python
Apache License 2.0
207 stars 28 forks source link

Cannot mix Long and Bool #8

Open frgomes opened 11 years ago

frgomes commented 11 years ago

The code below is a valid Python expression

sum(v) / float(len(v) - True)

but the similar code below does not compile:

@cutype("([Float], Bool) -> Float")
@cu
def cm2(v, sample):
    return sum(v) / float32(len(v) - sample)