From Python to Numpy

#artificialintelligence 

We pick the cell size to be bounded by (r)/( (n)), so that each grid cell will contain at most one sample, and thus the grid can be implemented as a simple n-dimensional array of integers: the default 1 indicates no sample, a non-negative integer gives the index of the sample located in a cell. Step 1. Select the initial sample, x0, randomly chosen uniformly from the domain.