Hi, I personnaly can't review this as this is too much in NumPy internal.
My only comments is that you could add a test and an example in the doc for matrix[list]. I think it will be the most used case. Fred On Wed, Jun 27, 2012 at 7:47 PM, John Salvatier <[email protected]> wrote: > I've submitted a pull request ( https://github.com/numpy/numpy/pull/326 ). > I'm new to the numpy and python internals, so feedback is greatly > appreciated. > > > On Tue, Jun 26, 2012 at 12:10 PM, Travis Oliphant <[email protected]> > wrote: >> >> >> On Jun 26, 2012, at 1:34 PM, Frédéric Bastien wrote: >> >> > Hi, >> > >> > I think he was referring that making NUMPY_ARRAY_OBJECT[...] syntax >> > support the operation that you said is hard. But having a separate >> > function do it is less complicated as you said. >> >> Yes. That's precisely what I meant. Thank you for clarifying. >> >> -Travis >> >> > >> > Fred >> > >> > On Tue, Jun 26, 2012 at 1:27 PM, John Salvatier >> > <[email protected]> wrote: >> >> Can you clarify why it would be super hard? I just reused the code for >> >> advanced indexing (a modification of PyArray_SetMap). Am I missing >> >> something >> >> crucial? >> >> >> >> >> >> >> >> On Tue, Jun 26, 2012 at 9:57 AM, Travis Oliphant <[email protected]> >> >> wrote: >> >>> >> >>> >> >>> On Jun 26, 2012, at 11:46 AM, John Salvatier wrote: >> >>> >> >>> Hello, >> >>> >> >>> If you increment an array using advanced indexing and have repeated >> >>> indexes, the array doesn't get repeatedly >> >>> incremented, >> >>> http://comments.gmane.org/gmane.comp.python.numeric.general/50291. >> >>> I wrote a C function that does incrementing with repeated indexes >> >>> correctly. >> >>> The branch is here (https://github.com/jsalvatier/numpy see the last >> >>> two >> >>> commits). Would a patch with a cleaned up version of a function like >> >>> this be >> >>> accepted into numpy? I'm not experienced writing numpy C code so I'm >> >>> sure it >> >>> still needs improvement. >> >>> >> >>> >> >>> This is great. It is an often-requested feature. It's *very >> >>> difficult* >> >>> to do without changing fundamentally what NumPy is. But, yes this >> >>> would be >> >>> a great pull request. >> >>> >> >>> Thanks, >> >>> >> >>> -Travis >> >>> >> >>> >> >>> >> >>> _______________________________________________ >> >>> NumPy-Discussion mailing list >> >>> [email protected] >> >>> http://mail.scipy.org/mailman/listinfo/numpy-discussion >> >>> >> >> >> >> >> >> _______________________________________________ >> >> NumPy-Discussion mailing list >> >> [email protected] >> >> http://mail.scipy.org/mailman/listinfo/numpy-discussion >> >> >> > _______________________________________________ >> > NumPy-Discussion mailing list >> > [email protected] >> > http://mail.scipy.org/mailman/listinfo/numpy-discussion >> >> _______________________________________________ >> NumPy-Discussion mailing list >> [email protected] >> http://mail.scipy.org/mailman/listinfo/numpy-discussion > > > > _______________________________________________ > NumPy-Discussion mailing list > [email protected] > http://mail.scipy.org/mailman/listinfo/numpy-discussion > _______________________________________________ NumPy-Discussion mailing list [email protected] http://mail.scipy.org/mailman/listinfo/numpy-discussion
