def ordinal(number):
  """
  Get ordinal string representation for input number(s).

  Parameters
  ----------
  number: Integer or 1D integer ndarray
     An integer or array of integers.

  Returns
  -------
  ord: String or List of strings
     Ordinal representation of input number(s).  Return a string if
     input is int; else, return a list of strings.

  Examples
  --------
  >>> from bibmanager.utils import ordinal
  >>> print(ordinal(1))
  1st
  >>> print(ordinal(2))
  2nd
  >>> print(ordinal(11))
  11th
  >>> print(ordinal(111))
  111th
  >>> print(ordinal(121))
  121st
  >>> print(ordinal(np.arange(1,6)))
  ['1st', '2nd', '3rd', '4th', '5th']
  """
  ending = ["th", "st", "nd", "rd"]
  unit = number % 10
  teen = (number//10) % 10 != 1
  idx = unit * (unit<4) * teen
  if type(number) is int:
      return f"{number}{ending[idx]}"
  return [f"{n}{ending[i]}" for n,i in zip(number,idx)]