Re: [Numpy-discussion] Is there any official position on PEP484/mypy?

2016-07-29 Thread Sebastian Berg
On Mi, 2016-07-27 at 20:07 +0100, Daniel Moisset wrote: > > Hi,  > > I work at Machinalis were we use a lot of numpy (and the pydata stack > in general). Recently we've also been getting involved with mypy, > which is a tool to type check (not on runtime, think of it as a > linter) annotated pyth

Re: [Numpy-discussion] Is there any official position on PEP484/mypy?

2016-07-29 Thread Daniel Moisset
Hi Sebastian, thanks for your reply I'm glad to hear that you see value in having type annotations. Just to clarify, my question was aimed at surveying if there was interest in accepting the work we're already doing if we contribute it and if it has value for the numpy project. I'm aware there's e

Re: [Numpy-discussion] Is there any official position on PEP484/mypy?

2016-07-29 Thread Benjamin Root
One thing that I have always wished for from a project like mypy is the ability to annotate what the expected shape should be. Too often, I get a piece of code from a coworker and it comes with no docstring explaining the expected dimensions of the input arrays and what the output array is going to

Re: [Numpy-discussion] Is there any official position on PEP484/mypy?

2016-07-29 Thread Daniel Moisset
I don't think a tool like mypy nor PEP 484 can talk about specific sizes (like the MxN and NxP for a matrix multiplication), but probably there are things that can be done at least about dimensionality (saying "a and b are 2d matrices, v is a 1-d vector"). But that's much farther about the road. Fo

Re: [Numpy-discussion] Is there any official position on PEP484/mypy?

2016-07-29 Thread Stephan Hoyer
I'm a big fan of type annotations and would support moving your repo over to the official typeshed repo or the NumPy GitHub organization to indicate it's official status. This is excellent work -- thank you for putting in the effort! Like Ben, I have also wished for type annotation support for dim

[Numpy-discussion] ufunc reduceat behavior on empty slices

2016-07-29 Thread Erik Brinkman
Hi, The behavior of a ufuncs reduceat on empty slices seems a little strange, and I wonder if there's a reason behind it / if there's a route to potentially changing it. First, I'll go into a little background. I've been making a lot of use of ufuncs reduceat functionality on staggered arrays. In

Re: [Numpy-discussion] ufunc reduceat behavior on empty slices

2016-07-29 Thread Stephan Hoyer
Jaime brought up the same issue recently, along with some other issues for ufunc.reduceat: https://mail.scipy.org/pipermail/numpy-discussion/2016-March/075199.html I completely agree with both of you that the current behavior for empty slices is very strange and should be changed to remove the spe