I have a rectangular 2D numpy array self.rho. For reasons of averaging I need an array containing the first 3 elements of self.rho[:][3]
. I tried self.rho[0:3][3]
. This however gives me List index out of range error, despite
print(self.rho[0][3])
print(self.rho[1][3])
print(self.rho[2][3])
print(self.rho[3][3])
working perfectly. If I do self.rho[0:100][3]
, no problem occures.