def binary_op_size(xx,yy):
x,y = make_same_length(xx,yy)<EOL>res = zeros(len(x))<EOL>for i in range(len(x)):<EOL><INDENT>if x[i] == y[i]:<EOL><INDENT>res[i] = x[i]<EOL><DEDENT>elif x[i] == <NUM_LIT:1>:<EOL><INDENT>res[i] = y[i]<EOL><DEDENT>elif y[i] == <NUM_LIT:1>:<EOL><INDENT>res[i] = x[i]<EOL><DEDENT>else:<EOL><INDENT>raise ValueError("<STR_LIT>")<EOL><DEDENT><DEDENT>return res<EOL>
This returns the resulting size from operating on xx, and yy
        with a binary operator.  It accounts for broadcasting, and
        throws errors if the array sizes are incompatible.