code: def round_array(array_in):
      
      if isinstance(array_in, ndarray):
          return np.round(array_in).astype(int)
      else:
          return int(np.round(array_in))
docs: arr_out = round_array(array_in)
  
      Rounds an array and recasts it to int. Also works on scalars.