code: def binary_op(data, op, other, blen=None, storage=None, create='array',
                **kwargs):
      
  
      # normalise scalars
      if hasattr(other, 'shape') and len(other.shape) == 0:
          other = other[()]
  
      if np.isscalar(other):
          def f(block):
              return op(block, other)
          return map_blocks(data, f, blen=blen, storage=storage, create=create, **kwargs)
  
      elif len(data) == len(other):
          def f(a, b):
              return op(a, b)
          return map_blocks((data, other), f, blen=blen, storage=storage, create=create,
                            **kwargs)
  
      else:
          raise NotImplementedError('argument type not supported')
docs: Compute a binary operation block-wise over `data`.