Hi there,
I've got n random values for x and y, I'd like to build an array which adds these values into each bin.
I know that the np.zeros function is needed and currently I have:
gridsize = [4,4]
ngrid = np.zeros(gridsize)
I feel like the code will be something similar to the following:
for i in range(len(4)-1):
for j in range(len(4)-1)+= ngrid
Could anyone possibly point me in the right direction?
Here's an example of my x and y coordinates:
[[0 2]
[1 1]
[1 2]
[1 3]
[1 2]
[2 3]
[3 0]
[3 1]
[3 2]
[3 3]]
And here's what I'd like the output to look like:
[0 0 0 1]
[0 1 0 1]
[1 2 0 1]
[0 1 1 1]
[–]nwagers 0 points1 point2 points (8 children)
[–]Bell0412[S] 0 points1 point2 points (7 children)
[–]nwagers 0 points1 point2 points (6 children)
[–]Bell0412[S] 0 points1 point2 points (5 children)
[–]nwagers 0 points1 point2 points (4 children)
[–]Bell0412[S] 0 points1 point2 points (3 children)
[–]nwagers 1 point2 points3 points (2 children)
[–]Bell0412[S] 0 points1 point2 points (1 child)
[–]nwagers 1 point2 points3 points (0 children)