On Thu, Jun 10, 2010 at 12:09 AM, Benjamin Root <[email protected]> wrote:
>> I think that arrays are just syntax on pointer is indeed the key
>> reason for how C works here. Since a[b] really means a + b (which is
>> why 5[a] and a[5] are the same), I don't see how to do it differently.
>
> Holy crap!  You can do that in C?!

Yes:

#include <stdio.h>

int main()
{
        float a[2] = {1.0, 2.0};

        printf("%f %f %f\n", a[1], *(a+1), 1[a]);
}
_______________________________________________
NumPy-Discussion mailing list
[email protected]
http://mail.scipy.org/mailman/listinfo/numpy-discussion

Reply via email to