On 8/19/11 4:54 AM, dahl.joac...@gmail.com wrote:
Personally I don't mind that the syntax is different.
I was about to give some examples of indexing and slicing
of Numpy arrays, which I remembered to be odd for matrices, but
then I realized that the indexing/slicing works exactly like
I expect it to, e.g.,
A[:, i]
picks out the i'th column. Has this always been the case
with Numpy? If that's the case, some of my objections
against Numpy are based on my own ignorance.
IIRC, it's been in numpy for years. Certainly at least 5 years or so,
and probably far longer than that. In fact, you can do much more, just
like in matlab. You can index using a boolean array, for example. See
http://docs.scipy.org/doc/numpy/reference/arrays.indexing.html or
http://www.scipy.org/NumPy_for_Matlab_Users#head-13d7391dd7e2c57d293809cff080260b46d8e664
for more details and examples.
You can use that notation with Sage matrices too. We've only had it for
maybe 4 years now, though. See
http://www.sagemath.org/doc/reference/sage/matrix/docs.html#indexing
Thanks,
Jason
--
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to
sage-devel+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org