Re: [Numpy-discussion] @ operator

2014-09-09 Thread Robert Kern
On Tue, Sep 9, 2014 at 8:52 PM, Charles R Harris wrote: > Hi All, > > I'm in the midst of implementing the '@' operator (PEP 465), and there are > some behaviors that are unspecified by the PEP. > > Should the operator accept array_like for one of the arguments? I would be mildly disappointed if

[Numpy-discussion] @ operator

2014-09-09 Thread Charles R Harris
Hi All, I'm in the midst of implementing the '@' operator (PEP 465), and there are some behaviors that are unspecified by the PEP. 1. Should the operator accept array_like for one of the arguments? 2. Does it need to handle __numpy_ufunc__, or will __array_priority__ serve? 3. Do we

Re: [Numpy-discussion] SFMT (faster mersenne twister)

2014-09-09 Thread Sturla Molden
On 09/09/14 20:08, Nathaniel Smith wrote: > There's also another reason why generator decisions should be part of > the RandomState object itself: we may want to change the distribution > methods themselves over time (e.g., people have been complaining for a > while that we use a suboptimal method

Re: [Numpy-discussion] SFMT (faster mersenne twister)

2014-09-09 Thread Nathaniel Smith
On 8 Sep 2014 14:43, "Robert Kern" wrote: > > On Mon, Sep 8, 2014 at 6:05 PM, Pierre-Andre Noel > wrote: > > > I think we could add new generators to NumPy though, > > > perhaps with a keyword to control the algorithm (defaulting to the > > current > > > Mersenne Twister). > > > > Why not do s

[Numpy-discussion] numpy ignores OPT/FOPT under Python3

2014-09-09 Thread Thomas Unterthiner
Hi! I want to use the OPT/FOPT environment viariables to set compiler flags when compiling numpy. However it seems that they get ignored under python3. Using Ubuntu 14.04 and numpy 1.9.0, I did the following: >export OPT="-march=native" >export FOPT = "-march=native" > python setup.py build

Re: [Numpy-discussion] Generalize hstack/vstack --> stack; Block matrices like in matlab

2014-09-09 Thread josef.pktd
On Tue, Sep 9, 2014 at 8:30 AM, wrote: > > > > On Tue, Sep 9, 2014 at 5:42 AM, Stefan Otte wrote: > >> Hey, >> >> @Josef, I wasn't aware of `bmat` and `np.asarray(np.bmat())` does >> basically what I want and what I'm already using. >> > > I never needed any tetris or anything similar except

Re: [Numpy-discussion] Generalize hstack/vstack --> stack; Block matrices like in matlab

2014-09-09 Thread josef.pktd
On Tue, Sep 9, 2014 at 5:42 AM, Stefan Otte wrote: > Hey, > > @Josef, I wasn't aware of `bmat` and `np.asarray(np.bmat())` does > basically what I want and what I'm already using. > I never needed any tetris or anything similar except for the matched block version. Just to point out two mor

Re: [Numpy-discussion] Generalize hstack/vstack --> stack; Block matrices like in matlab

2014-09-09 Thread Stefan Otte
Hey, @Josef, I wasn't aware of `bmat` and `np.asarray(np.bmat())` does basically what I want and what I'm already using. Regarding the Tetris problem: that never happened to me, but stack, as Josef pointed out, can handle that already :) I like the idea of removing the redundant square brack