code: def percentile(p, arr=None):
      
      if arr is None:
          return lambda arr: percentile(p, arr)
      if hasattr(p, '__iter__'):
          return np.array([percentile(x, arr) for x in p])
      if p == 0:
          return min(arr)
      assert 0 < p <= 100, 'Percentile requires a percent'
      i = (p/100) * len(arr)
      return sorted(arr)[math.ceil(i) - 1]
docs: Returns the pth percentile of the input array (the value that is at
      least as great as p% of the values in the array).
  
      If arr is not provided, percentile returns itself curried with p
  
      >>> percentile(74.9, [1, 3, 5, 9])
      5
      >>> percentile(75, [1, 3, 5, 9])
      5
      >>> percentile(75.1, [1, 3, 5, 9])
      9
      >>> f = percentile(75)
      >>> f([1, 3, 5, 9])
      5