<div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Apr 9, 2015 at 8:41 PM, Derek Homeier <span dir="ltr"><<a href="mailto:derek@astro.physik.uni-goettingen.de" target="_blank">derek@astro.physik.uni-goettingen.de</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><span class="">> but if I try to do both, I get the diagonal instead<br>
><br>
> >>> a[[1,2],[1,2]]<br>
> array([22, 33])<br>
><br>
</span>a[1:3,1:3]?<br>
<br>
Can’t be generalised to arbitrary selections of rows,columns, though (e.g. a[1::2,::2] still works…)<div class=""><div id=":17k" class="" tabindex="0"><img class="" src="//ssl.gstatic.com/ui/v1/icons/mail/images/cleardot.gif"></div></div></blockquote></div><br><span style="font-size:12.8000001907349px">I am interested in the arbitrary selection of rows and columns given by indices or by boolean selectors. </span><br></div></div>