@result: weldarray that is being updated
        @other: weldarray or scalar. (result binop other)
        @binop: str, operation to perform.

        FIXME: the common indexing pattern for parent/child in _update_view might be too expensive
        (uses if statements (unneccessary checks when updating child) and wouldn't be ideal to
        update a large parent).

def _update_views_binary(self, result, other, binop):
        '''
        @result: weldarray that is being updated
        @other: weldarray or scalar. (result binop other)
        @binop: str, operation to perform.

        FIXME: the common indexing pattern for parent/child in _update_view might be too expensive
        (uses if statements (unneccessary checks when updating child) and wouldn't be ideal to
        update a large parent).
        '''
        update_str_template = '{e2}{binop}e'
        v = result._weldarray_view
        if isinstance(other, weldarray):
            lookup_ind = 'i-{st}'.format(st=v.start)
            # update the base array to include the context from other
            v.base_array.weldobj.update(other.weldobj)
            e2 = 'lookup({arr2},{i}L)'.format(arr2 = other.weldobj.weld_code, i = lookup_ind)
        else:
            # other is just a scalar.
            e2 = str(other) + DTYPE_SUFFIXES[result._weld_type.__str__()]

        update_str = update_str_template.format(e2 = e2, binop=binop)
        v.base_array._update_range(v.start, v.end, update_str)