On Di, 2014-10-28 at 14:03 -0400, Alan G Isaac wrote:
> On 10/28/2014 1:42 PM, Stephan Hoyer wrote:
> > np.nditer is a reasonable alternative to .flat (and it's documented as 
> > such), but it's a rather inelegant, kitchen-sink type function.
> 
> 
> I'm not sure what "reasonable" means here,
> other than "in principle, possible to use".
> 
> In particular, `flat` is much more elegant,
> and includes an automatic guarantee that the
> iterations will be in C-contiguous style.
> 

I don't really like flat (it is a pretty old part of numpy), but I
agree, while you can force nditer to be C-contiguous, nditer has its own
problems and is also pretty complex. I would argue that nditer it is a
"you know what you are doing" type of function... Or of course if you
want to understand the C-Api.
Unless you keep in mind how buffers are copied around inside it, using
half its features is dangerous.

- Sebastian

> Alan
> 
> _______________________________________________
> NumPy-Discussion mailing list
> NumPy-Discussion@scipy.org
> http://mail.scipy.org/mailman/listinfo/numpy-discussion
> 

Attachment: signature.asc
Description: This is a digitally signed message part

_______________________________________________
NumPy-Discussion mailing list
NumPy-Discussion@scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion

Reply via email to