2 ms·
I looked into this more. The issue is, at least in a default input, a is an array type, so you need to either access a[0] or map over it. e.g. this works: de
by davedx 8y ago
I looked into this more. The issue is, at least in a default input, a is an array type, so you need to either access a[0] or map over it. e.g. this works:
def f(a):
v = a[0] if a[0] >= 4 else 2
return v
It looks like the main issue here is getting the correct compile error from Brython. Funnily enough this seems easier to do for the PySpark version :)