Re: [Numpy-discussion] Vectorized version of numpy.linspace

2018-11-14 Thread Matthew Harrigan
I put in an issue a while ago, https://github.com/numpy/numpy/issues/8839 My use case was somwhat similar to meshgrid but with a nonrectangular domain. Not terribly hard to code, but my expectation is that numpy functions should always allow broadcasting if that operation makes sense. On Nov

Re: [Numpy-discussion] asanyarray vs. asarray

2018-10-30 Thread Matthew Harrigan
Would the extended dtypes also violate the Liskov substitution principle? In place operations which would mutate the dtype are one potential issue. Would a single dtype for an array be sufficient, i.e. np.polynomial coefficients? Compared to ndarray subclasses, the memory layout issue goes away,

Re: [Numpy-discussion] LaTeX version of boolean indexing

2018-10-11 Thread Matthew Harrigan
My apologies, never write code directly in an email... s/b: mask = np.array([1, 0, 1], dtype=bool) What do you mean by indicator? On Thu, Oct 11, 2018 at 1:31 PM Andras Deak wrote: > On Thu, Oct 11, 2018 at 6:54 PM Matthew Harrigan > wrote: > > > > Hello, > > > &

[Numpy-discussion] LaTeX version of boolean indexing

2018-10-11 Thread Matthew Harrigan
Hello, I am documenting some code, translating the core of the algorithm to LaTeX. The style I have currently is very similar to the einsum syntax (which is awesome btw). Here is an example of some of the basic operations

Re: [Numpy-discussion] PR Cleanup

2018-09-27 Thread Matthew Harrigan
so not > directly relevant). > > All the best, > > Marten > > On Tue, Sep 25, 2018 at 8:25 PM Matthew Harrigan < > harrigan.matt...@gmail.com> wrote: > >> Speed, and to a lesser extent memory. The biggest advantage is it allows >> short circuiting with ridicu

Re: [Numpy-discussion] PR Cleanup

2018-09-25 Thread Matthew Harrigan
wrote: > > > On Tue, Sep 25, 2018 at 6:09 PM Matthew Harrigan < > harrigan.matt...@gmail.com> wrote: > >> PR 8528 <https://github.com/numpy/numpy/pull/8528> adds logical gufuncs >> such as " all equal". The functionality has been mentioned quite

Re: [Numpy-discussion] PR Cleanup

2018-09-25 Thread Matthew Harrigan
Would it be possible to have an opt-in for that bot? On Tue, Sep 25, 2018 at 8:01 PM Juan Nunez-Iglesias wrote: > > On 26 Sep 2018, at 5:12 am, Ralf Gommers wrote: > My $2c: I've had this "bot experience" happen to me once (for a pip > contribution), and that left a *really* bad taste. > > >

Re: [Numpy-discussion] Adoption of a Code of Conduct

2018-08-08 Thread Matthew Harrigan
I hope it has been worth the time. But if not take comfort that this is my last email on this topic. On Tue, Aug 7, 2018 at 12:31 PM, Chris Barker wrote: > On Mon, Aug 6, 2018 at 5:30 PM, Matthew Harrigan < > harrigan.matt...@gmail.com> wrote: > >> It's also key to note the speci

Re: [Numpy-discussion] Adoption of a Code of Conduct

2018-08-06 Thread Matthew Harrigan
es that more directly than the original. But in principle the difference, to me at least, is stark. Thank you for considering my view. On Mon, Aug 6, 2018 at 1:58 PM, Chris Barker wrote: > > On August 4, 2018 00:23:44 Matthew Harrigan >> wrote: >> >>> One concern

Re: [Numpy-discussion] Adoption of a Code of Conduct

2018-08-03 Thread Matthew Harrigan
One concern I have is the phrase "explicitly honour" in "we explicitly honour diversity in: age, culture, ...". Honour is a curious word choice. honour is defined as, among other things, "to worship", "high public esteem; fame; glory", and "a source of

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

2018-06-04 Thread Matthew Harrigan
Should there be discussion of typing (pep-484) or abstract base classes in this nep? Are there any requirements on the result returned by __array_function__? On Mon, Jun 4, 2018, 2:20 AM Stephan Hoyer wrote: > > On Sun, Jun 3, 2018 at 9:54 PM Hameer Abbasi > wrote: > >> Mixed return values of

Re: [Numpy-discussion] Allowing broadcasting of code dimensions in generalized ufuncs

2018-06-01 Thread Matthew Harrigan
wrote: > On Wed, May 30, 2018 at 5:01 PM Matthew Harrigan < > harrigan.matt...@gmail.com> wrote: > >> "short-cut to automatically return False if m != n", that seems like a >> silent bug >> > > I guess it depends on the use-cases. This is how np.

Re: [Numpy-discussion] A roadmap for NumPy - longer term planning

2018-06-01 Thread Matthew Harrigan
I would love to see gufuncs become more general. Specifically I would like an optional prologue and epilogue function. The prologue could potentially 1) inspect parameterized dtypes 2) kwargs 3) set non-trivial output array sizes 4) initialize data structures 5) defer processing to other

Re: [Numpy-discussion] Allowing broadcasting of code dimensions in generalized ufuncs

2018-05-30 Thread Matthew Harrigan
"short-cut to automatically return False if m != n", that seems like a silent bug AFAICT there are 3 possibilities: 1) current behavior 2) a scalar or size 1 array may be substituted, ie a constant 3) a scalar or array with shape[-1] == 1 may be substituted and broadcasted I am fond of using