Re: [Numpy-discussion] repeat an array without allocation

2014-05-04 Thread Jaime Fernández del Río
On Sun, May 4, 2014 at 9:34 PM, srean wrote: > Hi all, > > is there an efficient way to do the following without allocating A where > > A = np.repeat(x, [4, 2, 1, 3], axis=0) > c = A.dot(b)# b.shape > If x is a 2D array you can call repeat **after** dot, not before, which will save you s

Re: [Numpy-discussion] repeat an array without allocation

2014-05-04 Thread Eelco Hoogendoorn
nope; its impossible to express A as a strided view on x, for the repeats you have. even if you had uniform repeats, it still would not work. that would make it easy to add an extra axis to x without a new allocation; but reshaping/merging that axis with axis=0 would again trigger a copy, as it wo

[Numpy-discussion] repeat an array without allocation

2014-05-04 Thread srean
Hi all, is there an efficient way to do the following without allocating A where A = np.repeat(x, [4, 2, 1, 3], axis=0) c = A.dot(b)# b.shape thanks -- srean ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mai

[Numpy-discussion] ANN: Scipy 0.14.0 release

2014-05-04 Thread Ralf Gommers
Hi, On behalf of the Scipy development team I'm pleased to announce the availability of Scipy 0.14.0. This release contains new features (see release notes below) and 8 months worth of maintenance work. 80 people contributed to this release. This is also the first release for which binary wheels