[Numpy-discussion] Classes as records within an numpy array

Sturla Molden sturla at molden.no
Sun Apr 10 23:02:33 EDT 2011

Den 11.04.2011 04:17, skrev Sturla Molden:
> Consider that x[i][j] means ( x[i] )[j]. Then consider that x[i] in your
> case returns an instance of Record, not ndarray.

Sorry, disregard this.

a[i] is the same as a[i,:], which means that a[i,j] and a[i][j] will 
return the same.

But a[i,j] will be faster as you avoid a function call and avoid having 
to construct a view array for row i.

It's getting late :(


More information about the NumPy-Discussion mailing list