On 9 Sep, 03:45, hi_roger <rechardc...@gmail.com> wrote:
> hello, i want to ask a question about numpy.
>
> i know how to select a submatrix using the slice object in numpy. But
> how can i select a submatrix
> A[i1,i2,i3;j1,j2,j3] (elements in A on line i1,i2,i3 and column
> j1,j2,j3 ,  and i1,i2,i3,j1,j2,j3 are all arbitrary numbers )
> The submatrix must share data memory with original matrix.

So the only way to do this is to make an ndarray subclass that
overloads __getitem__, __setitem__, and __iter__, and takes care of
the mapping into A. Thus you get a double indirection.






-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to