i need some help to create a matrix of dim (65, 8) where all elements are unique integers in range(522) in python
thanx!!
def bootstrap(x, num_samples, statistic, alpha):
"""Returns bootstrap estimate of 100.0*(1-alpha) CI for statistic."""
n = len(x)
y=len(x)**(1/3)
idx = np.random.randint(0, n, (num_samples, y)) #Return unique random integers from 0 to 520 in a martix with size num_samples X 520.
samples = x[idx]
stat = np.sort(statistic(samples, 1))
return (stat[int((alpha/2.0)*num_samples)],
stat[int((1-alpha/2.0)*num_samples)])
0? So do you want numbers from range 0..519 or 1..520?x = np.arange(1, 521), np.random.shuffle(x); x = x.reshape(65, 8)