Re: [Numpy-discussion] NEP: Dispatch Mechanism for NumPy’s high level API

2018-06-08 Thread Marten van Kerkwijk
Hi Stephan, I think we're getting to the stage where an updated text would be useful. For that, you may want to consider an actual implementation of, e.g., a very simple function like `np.reshape` as well as a more complicated one like `np.concatenate`, and in particular how the implementation fin

Re: [Numpy-discussion] NEP: Dispatch Mechanism for NumPy’s high level API

2018-06-08 Thread Stephan Hoyer
On Fri, Jun 8, 2018 at 8:58 AM Marten van Kerkwijk < m.h.vankerkw...@gmail.com> wrote: > I think we're getting to the stage where an updated text would be useful. > Yes, I plan to work on this over the weekend. Stay tuned! > For that, you may want to consider an actual implementation of, e.g.,

Re: [Numpy-discussion] NEP: Dispatch Mechanism for NumPy’s high level API

2018-06-08 Thread Marten van Kerkwijk
> and in particular how the implementation finds out where its own instances >> are located. >> > > I think we've discussed this before, but I don't think this is feasible to > solve in general given the diversity of wrapped APIs. If you want to find > the arguments in which a class' own instances

Re: [Numpy-discussion] NEP: Dispatch Mechanism for NumPy’s high level API

2018-06-08 Thread Stephan Hoyer
(offlist) To clarify, by "where_i_am" you mean something like the name of the argument where it was found? On Fri, Jun 8, 2018 at 4:49 PM Marten van Kerkwijk < m.h.vankerkw...@gmail.com> wrote: > and in particular how the implementation finds out where its own instances >>> are located. >>> >> >

Re: [Numpy-discussion] NEP: Dispatch Mechanism for NumPy’s high level API

2018-06-08 Thread Marten van Kerkwijk
I meant whatever the state of the dance routine is, e.g., the way the arguments are enumerated by the decorator ​(this is partially why some example code for the dance routine is needed -- I am not 100% how this should work, just seems logical that if the dance routine can understand it, so can __a