Re: [Numpy-discussion] Heads-up: Guido van Rossum on mypy-style type annotations...

2014-08-15 Thread Andrea Gavana
On 15 August 2014 20:32, Fernando Perez wrote: > Hi folks, > > [x-posting to numba and numpy lists, discussion should be on the > python-ideas list where the python core folks actually reside] > > just a quick note that Guido has proposed to adopt the mypy model for type > annotations in the langu

Re: [Numpy-discussion] Proposed new feature for numpy.einsum: repeated output subscripts as diagonal

2014-08-15 Thread Eelco Hoogendoorn
here is a snippet I extracted from a project with similar aims (integrating the functionality of einsum and numexpr, actually) Not much to it, but in case someone needs a reminder on how to use striding tricks: http://pastebin.com/kQNySjcj On Fri, Aug 15, 2014 at 5:20 PM, Eelco Hoogendoorn < hoo

[Numpy-discussion] Heads-up: Guido van Rossum on mypy-style type annotations...

2014-08-15 Thread Fernando Perez
Hi folks, [x-posting to numba and numpy lists, discussion should be on the python-ideas list where the python core folks actually reside] just a quick note that Guido has proposed to adopt the mypy model for type annotations in the language: http://thread.gmane.org/gmane.comp.python.ideas/28619

[Numpy-discussion] Question about OpenBLAS affinity setting.

2014-08-15 Thread Charles R Harris
Hi All, Seeking some discussion about setting the OpenBLAS affinity. Currently this is set when numeric.py is imported: try: > # disables openblas affinity setting of the main thread that limits > # python threads or processes to one core > if 'OPENBLAS_MAIN_FREE' not in os.environ: >

Re: [Numpy-discussion] Proposed new feature for numpy.einsum: repeated output subscripts as diagonal

2014-08-15 Thread Eelco Hoogendoorn
Well, there is the numpy-API C level, and then there is the arcane macro C level. The two might as well be a completely different language. Indeed, it should be doing something similar for the inputs. Actually, I think I wrote a wrapper around einsum/numexpr once that performed this generalized in

Re: [Numpy-discussion] Proposed new feature for numpy.einsum: repeated output subscripts as diagonal

2014-08-15 Thread Sebastian Berg
On Fr, 2014-08-15 at 16:42 +0200, Eelco Hoogendoorn wrote: > Agreed; this addition occurred to me as well. Note that the > implemenatation should be straightforward: just allocate an enlarged > array, use some striding logic to construct the relevant view, and let > einsums internals act on the vie

Re: [Numpy-discussion] Proposed new feature for numpy.einsum: repeated output subscripts as diagonal

2014-08-15 Thread Eelco Hoogendoorn
Agreed; this addition occurred to me as well. Note that the implemenatation should be straightforward: just allocate an enlarged array, use some striding logic to construct the relevant view, and let einsums internals act on the view. hopefully, you wont even have to touch the guts of einsum at the

Re: [Numpy-discussion] Proposed new feature for numpy.einsum: repeated output subscripts as diagonal

2014-08-15 Thread Sebastian Berg
On Do, 2014-08-14 at 12:42 -0700, Stephan Hoyer wrote: > I think this would be very nice addition. > > > On Thu, Aug 14, 2014 at 12:21 PM, Benjamin Root > wrote: > You had me at Kronecker delta... :-) +1 > Sounds good to me. I don't see a reason for not relaxing the restrictio

[Numpy-discussion] Weighted Covariance/correlation

2014-08-15 Thread Sebastian Berg
Hi all, Tom Poole has opened pull request https://github.com/numpy/numpy/pull/4960 to implement weights into np.cov (correlation can be added), somewhat picking up the effort started by Noel Dawe in https://github.com/numpy/numpy/pull/3864. The pull request would currently implement an accuracy t