Den 11.04.2011 03:59, skrev David Crisp: > > Is it a significant problem if I use the x[i][j] method and not the > x[i,j] method? Or are we talking about trying to stick with a > convention?
It is a significant problem. Consider that x[i][j] means ( x[i] )[j]. Then consider that x[i] in your case returns an instance of Record, not ndarray. If you want 2D indexing on an ndarray, it should be written as x[i,j]. A 2D NumPY array is not an array of arrays. If you work with nested Python lists, you should index x[i][j], because x[i] will return a list. Sturla _______________________________________________ NumPy-Discussion mailing list [email protected] http://mail.scipy.org/mailman/listinfo/numpy-discussion
