def _probvec(r, out):
 n = r.shape[0]
 r.sort()
 out[0] = r[0]
 for i in range(1, n):
  out[i] = (r[i] - r[(i - 1)])
 out[n] = (1 - r[(n - 1)])

def _probvec ( r , out ) : n = r . shape [ 0 ] r . sort ( ) out [ 0 ] = r [ 0 ] for i in range ( 1 , n ) : out [ i ] = ( r [ i ] - r [ ( i - 1 ) ] ) out [ n ] = ( 1 - r [ ( n - 1 ) ] )
fill out with randomly sampled probability vectors as rows .