def sorted_product_set ( array_a , array_b ) : return np . sort ( np . concatenate ( [ array_a [ i ] * array_b for i in xrange ( len ( array_a ) ) ] , axis = 0 ) ) [ : : - 1 ]
python numpy two matrix element wise function
Compute the product set of array_a and array_b and sort it .
def sorted_product_set(array_a, array_b):
  """Compute the product set of array_a and array_b and sort it."""
  return np.sort(
      np.concatenate(
          [array_a[i] * array_b for i in xrange(len(array_a))], axis=0)
  )[::-1]