@statfunc
def quantiles(x, qlist=(2.5, 25, 50, 75, 97.5), transform=(lambda x: x)):
 x = transform(x.copy())
 if (x.ndim > 1):
  sx = np.sort(x.T).T
 else:
  sx = np.sort(x)
 try:
  quants = [sx[int(((len(sx) * q) / 100.0))] for q in qlist]
  return dict(zip(qlist, quants))
 except IndexError:
  _log.warning('Too few elements for quantile calculation')

@ statfunc def quantiles ( x , qlist = ( 2.5 , 25 , 50 , 75 , 97.5 ) , transform = ( lambda x : x ) ) : x = transform ( x . copy ( ) ) if ( x . ndim > 1 ) : sx = np . sort ( x . T ) . T else : sx = np . sort ( x ) try : quants = [ sx [ int ( ( ( len ( sx ) * q ) / 100.0 ) ) ] for q in qlist ] return dict ( zip ( qlist , quants ) ) except IndexError : _log . warning ( 'Too few elements for quantile calculation' )
compute rowwise array quantiles on an input .