code: def secondary_mass(mass1, mass2):
      
      mass1, mass2, input_is_array = ensurearray(mass1, mass2)
      if mass1.shape != mass2.shape:
          raise ValueError("mass1 and mass2 must have same shape")
      ms = copy.copy(mass2)
      mask = mass1 < mass2
      ms[mask] = mass1[mask]
      return formatreturn(ms, input_is_array)
docs: Returns the smaller of mass1 and mass2 (s = secondary).