I think that the following does more or less what you want:<div><br></div><div>flex.show(grid[1:2,:])</div><div><br></div><div>Currently the multidimensional slicing only accepts slices as all the arguments, not a mixture of slices and integers.</div>

<div><br></div><div>Richard<br><br><div class="gmail_quote">2012/1/2 Jan Marten Simons <span dir="ltr">&lt;<a href="mailto:marten@xtal.rwth-aachen.de">marten@xtal.rwth-aachen.de</a>&gt;</span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

Hi,<br>
<br>
I&#39;ve found a minor inconveniance using the flex type:<br>
<br>
test case:<br>
<br>
import numpy as np<br>
np_grid=np.double(np.zeros((3,7)))<br>
np_grid[1,3]=3.0<br>
print(np_grid) �# works<br>
print(np_grid[1,:]) �# works<br>
<br>
from cctbx.array_family import flex<br>
grid=flex.double(flex.grid(3,7))<br>
grid[1,3]=3.0<br>
flex.show(grid) � � � � #works<br>
flex.show(grid[1,:]) �#gives error (see below)<br>
<br>
&quot;TypeError: All items must be of same type.&quot;<br>
<br>
Is there another simple way to do sclices with flex arrays or could this be<br>
implemented the same way as in numpy by someone who is more into c++ than<br>
myself?<br>
<br>
Thanks,<br>
Jan<br>
_______________________________________________<br>
cctbxbb mailing list<br>
<a href="mailto:cctbxbb@phenix-online.org">cctbxbb@phenix-online.org</a><br>
<a href="http://phenix-online.org/mailman/listinfo/cctbxbb" target="_blank">http://phenix-online.org/mailman/listinfo/cctbxbb</a><br>
</blockquote></div><br></div>