Re: [Numpy-discussion] Why do mgrid and meshgrid not return broadcast arrays?

2017-03-08 Thread Warren Weckesser
On Wed, Mar 8, 2017 at 9:48 PM, Juan Nunez-Iglesias wrote: > I was a bit surprised to discover that both meshgrid nor mgrid return > fully instantiated arrays, when simple broadcasting (ie with stride=0 for > other axes) is functionally identical and happens much, much faster. > > Take a look at

Re: [Numpy-discussion] Intel random number package

2016-10-26 Thread Warren Weckesser
On Wed, Oct 26, 2016 at 3:24 PM, Nathaniel Smith wrote: > On Wed, Oct 26, 2016 at 9:10 AM, Julian Taylor > wrote: > > On 10/26/2016 06:00 PM, Julian Taylor wrote: > >> > >> On 10/26/2016 10:59 AM, Ralf Gommers wrote: > >>> > >>> > >>> > >>> On Wed, Oct 26, 2016 at 8:33 PM, Julian Taylor > >>> ma

Re: [Numpy-discussion] Integers to integer powers

2016-05-20 Thread Warren Weckesser
On Fri, May 20, 2016 at 4:22 PM, Alan Isaac wrote: > On 5/19/2016 11:30 PM, Nathaniel Smith wrote: > >> the last bad >> option IMHO would be that we make int ** (negative int) an error in >> all cases, and the error message can suggest that instead of writing >> >> np.array(2) ** -2 >> >> the

Re: [Numpy-discussion] reshaping empty array bug?

2016-02-23 Thread Warren Weckesser
On Tue, Feb 23, 2016 at 11:32 AM, Benjamin Root wrote: > Not exactly sure if this should be a bug or not. This came up in a fairly > general function of mine to process satellite data. Unexpectedly, one of > the satellite files had no scans in it, triggering an exception when I > tried to reshape

Re: [Numpy-discussion] array of random numbers fails to construct

2015-12-07 Thread Warren Weckesser
On Sun, Dec 6, 2015 at 6:55 PM, Allan Haldane wrote: > > I've also often wanted to generate large datasets of random uint8 and > uint16. As a workaround, this is something I have used: > > np.ndarray(100, 'u1', np.random.bytes(100)) > > It has also crossed my mind that np.random.randint and np.ra

Re: [Numpy-discussion] Proposal: stop supporting 'setup.py install'; start requiring 'pip install .' instead

2015-10-29 Thread Warren Weckesser
On Tue, Oct 27, 2015 at 12:31 AM, Nathaniel Smith wrote: > Hi all, > > Apparently it is not well known that if you have a Python project > source tree (e.g., a numpy checkout), then the correct way to install > it is NOT to type > > python setup.py install # bad and broken! > > but rather to

Re: [Numpy-discussion] Any interest in a 'heaviside' ufunc?

2015-02-03 Thread Warren Weckesser
On Tue, Feb 3, 2015 at 11:14 PM, Sturla Molden wrote: > Warren Weckesser wrote: > > > 0if x < 0 > > heaviside(x) = 0.5 if x == 0 > > 1if x > 0 > > > > This is not correct. The discrete form of the

[Numpy-discussion] Any interest in a 'heaviside' ufunc?

2015-02-03 Thread Warren Weckesser
I have an implementation of the Heaviside function as numpy ufunc. Is there any interest in adding this to numpy? The function is simply: 0if x < 0 heaviside(x) = 0.5 if x == 0 1if x > 0 Warren __

Re: [Numpy-discussion] F2PY cannot see module-scope variables

2015-01-26 Thread Warren Weckesser
On 1/26/15, Yuxiang Wang wrote: > Dear all, > > Sorry about being new to both Fortran 90 and f2py. > > I have a module in fortran, written as follows, with a module-scope variable > dp: > > > ! testf2py.f90 > module testf2py > implicit none > privat

Re: [Numpy-discussion] New function `count_unique` to generate contingency tables.

2015-01-25 Thread Warren Weckesser
On Sun, Jan 25, 2015 at 1:48 PM, Warren Weckesser < warren.weckes...@gmail.com> wrote: > > > On Wed, Aug 13, 2014 at 6:17 PM, Eelco Hoogendoorn < > hoogendoorn.ee...@gmail.com> wrote: > >> Its pretty easy to implement this table functionality and more on top of &g

Re: [Numpy-discussion] New function `count_unique` to generate contingency tables.

2015-01-25 Thread Warren Weckesser
; t = np.zeros(shape, np.int) > np.add.at(t, inverses, 1) > return tuple(uniques), t > #here is how to use > print table(x,y) > #but we can use fancy keys as well; here a composite key and a row-key > print table((x,y), z) > #this effectively creates a sparse matrix eq

Re: [Numpy-discussion] Characteristic of a Matrix.

2015-01-05 Thread Warren Weckesser
On Mon, Jan 5, 2015 at 1:58 PM, Nathaniel Smith wrote: > I'm afraid that I really don't understand what you're trying to say. Is > there something that you think numpy should be doing differently? > > This is a case similar to the issue discussed in https://github.com/numpy/numpy/issues/5303. I

Re: [Numpy-discussion] Add `nrows` to `genfromtxt`

2014-11-02 Thread Warren Weckesser
On 11/2/14, Alexander Belopolsky wrote: > On Sun, Nov 2, 2014 at 2:32 PM, Warren Weckesser > > wrote: > >> >>> Still, the case of dtype=None, name=None is problematic. Suppose I >>> want >>> genfromtxt() to detect the column names from the 1-st r

Re: [Numpy-discussion] Add `nrows` to `genfromtxt`

2014-11-02 Thread Warren Weckesser
On Sun, Nov 2, 2014 at 2:18 PM, Alexander Belopolsky wrote: > > On Sun, Nov 2, 2014 at 1:56 PM, Warren Weckesser < > warren.weckes...@gmail.com> wrote: > >> Or you could just call genfromtxt() once with `max_rows=1` to skip a >> row. (I'm assuming that the

Re: [Numpy-discussion] Add `nrows` to `genfromtxt`

2014-11-02 Thread Warren Weckesser
On Sat, Nov 1, 2014 at 4:41 PM, Alexander Belopolsky wrote: > > On Sat, Nov 1, 2014 at 3:15 PM, Warren Weckesser < > warren.weckes...@gmail.com> wrote: > >> Is there wider interest in such an argument to `genfromtxt`? For my >> use-cases, `max_rows` is sufficient

Re: [Numpy-discussion] Add `nrows` to `genfromtxt`

2014-11-01 Thread Warren Weckesser
On 11/1/14, Alan G Isaac wrote: > On 11/1/2014 3:15 PM, Warren Weckesser wrote: >> I intended the result of `genfromtxt(..., max_rows=n)` to produce the same >> array as produced by `genfromtxt(...)[:n]`. > > I find that counterintuitive. > I would first honor skip_heade

Re: [Numpy-discussion] Add `nrows` to `genfromtxt`

2014-11-01 Thread Warren Weckesser
On 11/1/14, Alan G Isaac wrote: > On 11/1/2014 4:41 PM, Alexander Belopolsky wrote: >> I cannot think of a situation where I would need more generality such as >> reading every 3rd row or rows with the given numbers. Such processing is >> normally done after the text data is loaded into an array.

Re: [Numpy-discussion] Add `nrows` to `genfromtxt`

2014-11-01 Thread Warren Weckesser
On Sat, Nov 1, 2014 at 10:54 AM, Alan G Isaac wrote: > On 11/1/2014 10:31 AM, Warren Weckesser wrote: > > Alan's suggestion to use a slice is interesting, but I'd like to > > see a more concrete proposal for the API. For example, how does > > it interact with

Re: [Numpy-discussion] Add `nrows` to `genfromtxt`

2014-11-01 Thread Warren Weckesser
On 9/24/14, Alan G Isaac wrote: > On 9/24/2014 2:52 PM, Jaime Fernández del Río wrote: >> There is a PR in github that adds a new keyword to the genfromtxt >> function, to limit the number of rows that actually get read in: >> https://github.com/numpy/numpy/pull/5103 > > Sorry to come late to this

Re: [Numpy-discussion] Request for enhancement to numpy.random.shuffle

2014-10-16 Thread Warren Weckesser
On Thu, Oct 16, 2014 at 12:40 PM, Nathaniel Smith wrote: > On Thu, Oct 16, 2014 at 4:39 PM, Warren Weckesser > wrote: > > > > On Sun, Oct 12, 2014 at 9:13 PM, Nathaniel Smith wrote: > >> > >> Regarding names: shuffle/permutation is a terrible naming c

Re: [Numpy-discussion] Request for enhancement to numpy.random.shuffle

2014-10-16 Thread Warren Weckesser
On Sun, Oct 12, 2014 at 9:13 PM, Nathaniel Smith wrote: > On Sun, Oct 12, 2014 at 5:14 PM, Sebastian wrote: > > > > On 2014-10-12 16:54, Warren Weckesser wrote: > >> > >> > >> On Sun, Oct 12, 2014 at 7:57 AM, Robert Kern >> <mailto:robert.k

Re: [Numpy-discussion] Request for enhancement to numpy.random.shuffle

2014-10-12 Thread Warren Weckesser
On Sun, Oct 12, 2014 at 12:14 PM, Warren Weckesser < warren.weckes...@gmail.com> wrote: > > > On Sat, Oct 11, 2014 at 6:51 PM, Warren Weckesser < > warren.weckes...@gmail.com> wrote: > >> I created an issue on github for an enhancement >> to numpy.random.s

Re: [Numpy-discussion] Request for enhancement to numpy.random.shuffle

2014-10-12 Thread Warren Weckesser
On Sat, Oct 11, 2014 at 6:51 PM, Warren Weckesser < warren.weckes...@gmail.com> wrote: > I created an issue on github for an enhancement > to numpy.random.shuffle: > https://github.com/numpy/numpy/issues/5173 > I'd like to get some feedback on the idea. > > Curr

Re: [Numpy-discussion] Request for enhancement to numpy.random.shuffle

2014-10-12 Thread Warren Weckesser
On Sun, Oct 12, 2014 at 11:20 AM, wrote: > On Sun, Oct 12, 2014 at 10:54 AM, Warren Weckesser > wrote: > > > > > > On Sun, Oct 12, 2014 at 7:57 AM, Robert Kern > wrote: > >> > >> On Sat, Oct 11, 2014 at 11:51 PM, Warren Weckesser > >> wrot

Re: [Numpy-discussion] Request for enhancement to numpy.random.shuffle

2014-10-12 Thread Warren Weckesser
On Sun, Oct 12, 2014 at 7:57 AM, Robert Kern wrote: > On Sat, Oct 11, 2014 at 11:51 PM, Warren Weckesser > wrote: > > > A small wart in this API is the meaning of > > > > shuffle(a, independent=False, axis=None) > > > > It could be argued that the cor

[Numpy-discussion] Request for enhancement to numpy.random.shuffle

2014-10-11 Thread Warren Weckesser
I created an issue on github for an enhancement to numpy.random.shuffle: https://github.com/numpy/numpy/issues/5173 I'd like to get some feedback on the idea. Currently, `shuffle` shuffles the first dimension of an array in-place. For example, shuffling a 2D array shuffles the rows: In [227]

[Numpy-discussion] Online docs for numpy are for version 1.8

2014-09-25 Thread Warren Weckesser
Pinging the webmeisters: numpy 1.9 is released, but the docs at http://docs.scipy.org/doc/numpy/ are still for version 1.8. Warren ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] New function `count_unique` to generate contingency tables.

2014-08-13 Thread Warren Weckesser
unctions. I won't update it right now, but if there is interest in putting it into numpy, I'll rename it to avoid the pylab conflict. Anything along the lines of `crosstab`, `xtable`, etc., would be fine with me. Warren > On Wed, Aug 13, 2014 at 4:57 PM, Warren Weckesser < &g

Re: [Numpy-discussion] New function `count_unique` to generate contingency tables.

2014-08-13 Thread Warren Weckesser
On Tue, Aug 12, 2014 at 12:51 PM, Eelco Hoogendoorn < hoogendoorn.ee...@gmail.com> wrote: > ah yes, that's also an issue I was trying to deal with. the semantics I > prefer in these type of operators, is (as a default), to have every array > be treated as a sequence of keys, so if calling unique(a

Re: [Numpy-discussion] New function `count_unique` to generate contingency tables.

2014-08-12 Thread Warren Weckesser
On Tue, Aug 12, 2014 at 11:35 AM, Warren Weckesser < warren.weckes...@gmail.com> wrote: > I created a pull request (https://github.com/numpy/numpy/pull/4958) that > defines the function `count_unique`. `count_unique` generates a > contingency table from a collection of sequence

[Numpy-discussion] New function `count_unique` to generate contingency tables.

2014-08-12 Thread Warren Weckesser
I created a pull request (https://github.com/numpy/numpy/pull/4958) that defines the function `count_unique`. `count_unique` generates a contingency table from a collection of sequences. For example, In [7]: x = [1, 1, 1, 1, 2, 2, 2, 2, 2] In [8]: y = [3, 4, 3, 3, 3, 4, 5, 5, 5] In [9]: (xvals

Re: [Numpy-discussion] Easter Egg or what I am missing here?

2014-05-21 Thread Warren Weckesser
On 5/21/14, Siegfried Gonzi wrote: > Please would anyone tell me the following is an undocumented bug > otherwise I will lose faith in everything: > > == > import numpy as np > > > years = [2004,2005,2006,2007] > > dates = [20040501,20050601,20060801,20071001] > > for x in years: > > print 'y

Re: [Numpy-discussion] Test error with ATLAS, Windows 64 bit

2014-04-14 Thread Warren Weckesser
On Mon, Apr 14, 2014 at 2:59 PM, Matthew Brett wrote: > Hi, > > With Carl Kleffner, I am trying to build a numpy 1.8.1 wheel for > Windows 64-bit, and latest stable ATLAS. > > It works fine, apart from the following test failure: > >

[Numpy-discussion] assert_equal(-0.0, 0.0) fails.

2014-04-14 Thread Warren Weckesser
The test function numpy.testing.assert_equal fails when comparing -0.0 and 0.0: In [16]: np.testing.assert_equal(-0.0, 0.0) --- AssertionErrorTraceback (most recent call last) in () > 1 np.test

Re: [Numpy-discussion] [RFC] should we argue for a matrix power operator, @@?

2014-03-15 Thread Warren Weckesser
On Sat, Mar 15, 2014 at 8:38 PM, wrote: > I think I wouldn't use anything like @@ often enough to remember it's > meaning. I'd rather see english names for anything that is not **very** > common. > > I find A@@-1 pretty ugly compared to inv(A) > A@@(-0.5) might be nice (do we have matrix_sqrt

Re: [Numpy-discussion] New (old) function proposal.

2014-02-19 Thread Warren Weckesser
On Tue, Feb 18, 2014 at 11:27 AM, Sebastian Berg wrote: > On Di, 2014-02-18 at 09:05 -0700, Charles R Harris wrote: > > Hi All, > > > > > > There is an old ticket, #1499, that suggest adding a segment_axis > > function. > > > > def segment_axis(a, length, overlap=0, axis=None, end='cut', endvalue

Re: [Numpy-discussion] bug in comparing object arrays to None (?)

2014-01-27 Thread Warren Weckesser
On Mon, Jan 27, 2014 at 3:43 PM, Charles G. Waldman wrote: > Hi Numpy folks. > > I just noticed that comparing an array of type 'object' to None does > not behave as I expected. Is this a feature or a bug? (I can take a > stab at fixing it if it's a bug, as I believe it is). > > >>> np.version.f

Re: [Numpy-discussion] git tag for version 1.8?

2013-12-20 Thread Warren Weckesser
On 12/20/13, Charles R Harris wrote: > On Thu, Dec 19, 2013 at 10:16 PM, Warren Weckesser < > warren.weckes...@gmail.com> wrote: > >> Is version 1.8.0 tagged in git? I see tags up to 1.7.1. I suspect >> the tagging convention has changed in the git repo.

[Numpy-discussion] git tag for version 1.8?

2013-12-19 Thread Warren Weckesser
Is version 1.8.0 tagged in git? I see tags up to 1.7.1. I suspect the tagging convention has changed in the git repo. How do I checkout v1.8.0? Warren ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/

Re: [Numpy-discussion] (no subject)

2013-11-22 Thread Warren Weckesser
On Fri, Nov 22, 2013 at 4:23 PM, Matthew Brett wrote: > Hi, > > I'm sorry if I missed something obvious - but is there a vectorized > way to look for None in an array? > > In [3]: a = np.array([1, 1]) > > In [4]: a == object() > Out[4]: array([False, False], dtype=bool) > > In [6]: a == None > Out

Re: [Numpy-discussion] numpy.savetxt to string?

2013-11-06 Thread Warren Weckesser
Which version of numpy are you using? I just tried it with 1.7.1, and it accepted a StringIO instance. The docstring says the first argument may be a filename or file handle ( http://docs.scipy.org/doc/numpy/reference/generated/numpy.savetxt.html#numpy.savetxt ). Warren On Wed, Nov 6, 2013 a

Re: [Numpy-discussion] Valid algorithm for generating a 3D Wiener Process?

2013-09-25 Thread Warren Weckesser
On Wed, Sep 25, 2013 at 1:41 PM, David Goldsmith wrote: > Thanks, guys. Yeah, I realized the problem w/ the > uniform-increment-variable-direction approach this morning: physically, it > ignores the fact that the particles hitting the particle being tracked are > going to have a distribution of m

Re: [Numpy-discussion] Valid algorithm for generating a 3D Wiener Process?

2013-09-25 Thread Warren Weckesser
On Wed, Sep 25, 2013 at 12:51 PM, Warren Weckesser < warren.weckes...@gmail.com> wrote: > > On Wed, Sep 25, 2013 at 9:36 AM, Neal Becker wrote: > >> David Goldsmith wrote: >> >> > Is this a valid algorithm for generating a 3D Wiener process? (When I >>

Re: [Numpy-discussion] Valid algorithm for generating a 3D Wiener Process?

2013-09-25 Thread Warren Weckesser
On Wed, Sep 25, 2013 at 9:36 AM, Neal Becker wrote: > David Goldsmith wrote: > > > Is this a valid algorithm for generating a 3D Wiener process? (When I > > graph the results, they certainly look like potential Brownian motion > > tracks.) > > > > def Wiener3D(incr, N): > > r = incr*(R.randi

Re: [Numpy-discussion] Unexpected casting result

2013-09-16 Thread Warren Weckesser
On Mon, Sep 16, 2013 at 1:54 PM, Warren Weckesser < warren.weckes...@gmail.com> wrote: > An unexpected casting result was just reported on stackoverflow: > > http://stackoverflow.com/questions/18833639/attributeerror-in-python-numpy-when-constructing-function-for-certain-values &g

[Numpy-discussion] Unexpected casting result

2013-09-16 Thread Warren Weckesser
An unexpected casting result was just reported on stackoverflow: http://stackoverflow.com/questions/18833639/attributeerror-in-python-numpy-when-constructing-function-for-certain-values The following show the essence of the issue: In [1]: np.__version__ Out[1]: '1.9.0.dev-6ce65d8' In [2]: type(n

Re: [Numpy-discussion] A bug in numpy.random.shuffle?

2013-09-05 Thread Warren Weckesser
On Thu, Sep 5, 2013 at 2:11 PM, Fernando Perez wrote: > Hi all, > > I just ran into this rather weird behavior: > > http://nbviewer.ipython.org/6453869 > > In summary, as far as I can tell, shuffle is misbehaving when acting > on arrays that have structured dtypes. I've seen the problem on 1.7.1

Re: [Numpy-discussion] numpy dot returns [nan nan nan]

2013-08-24 Thread Warren Weckesser
) In [3]: y = np.array([1e10]) In [4]: np.dot(x, y) Out[4]: inf Multiplying `x` and `y` generates the warning, as expected: In [5]: x*y /home/warren/anaconda/bin/ipython:1: RuntimeWarning: overflow encountered in multiply #!/home/warren/anaconda/bin/python Out[5]: array([ inf]) Warren >

Re: [Numpy-discussion] numpy dot returns [nan nan nan]

2013-08-24 Thread Warren Weckesser
On 8/24/13, Warren Weckesser wrote: > On 8/24/13, Tom Bennett wrote: >> Hi All, >> >> I have two arrays, A and B.A is 3 x 100,000 and B is 100,000. If I do >> np.dot(A,B), I get [nan, nan, nan]. >> >> However, np.any(np.isnan(A))==False and np.any(no.isna

Re: [Numpy-discussion] numpy dot returns [nan nan nan]

2013-08-24 Thread Warren Weckesser
On 8/24/13, Tom Bennett wrote: > Hi All, > > I have two arrays, A and B.A is 3 x 100,000 and B is 100,000. If I do > np.dot(A,B), I get [nan, nan, nan]. > > However, np.any(np.isnan(A))==False and np.any(no.isnan(B))==False. And > also np.seterr(all='print') does not print anything. > > I am not w

[Numpy-discussion] Warnings not raised by np.log in 32 bit build on Windows

2013-08-22 Thread Warren Weckesser
I'm investigating a test error in scipy 0.13.0 beta 1 that was reported by Christoph Gohlke. The scipy issue is here: https://github.com/scipy/scipy/issues/2771 I don't have a Windows environment to test it myself, but Christoph reported that this code: ``` import numpy as np data = np.array([-

Re: [Numpy-discussion] NumPy-Discussion Digest, Vol 83, Issue 33

2013-08-20 Thread Warren Weckesser
On 8/20/13, rodrigo koblitz wrote: > Hi, > How I can do this: > int(scipy.comb(20314,117)) > ... > OverflowError: cannot convert float infinity to integer > I assume you mean `scipy.misc.comb`. If you give `comb` the argument `exact=True`, it will give the exact result as a Python long integer:

Re: [Numpy-discussion] fresh performance hits: numpy.linalg.pinv >30% slowdown

2013-07-19 Thread Warren Weckesser
On 7/19/13, Yaroslav Halchenko wrote: > I have just added a few more benchmarks, and here they come > http://www.onerussian.com/tmp/numpy-vbench/vb_vb_linalg.html#numpy-linalg-pinv-a-float32 > it seems to be very recent so my only check based on 10 commits > didn't pick it up yet so they are not p

Re: [Numpy-discussion] retrieving original array locations from 2d argsort

2013-07-15 Thread Warren Weckesser
On 7/15/13, Moroney, Catherine M (398D) wrote: > I know that there's an easy way to solve this problem, but I'm not > sufficiently knowledgeable > about numpy indexing to figure it out. > > Here is the problem: > > Take a 2-d array a, of any size. > Sort it in ascending order using, I presume, arg

Re: [Numpy-discussion] What should be the result in some statistics corner cases?

2013-07-14 Thread Warren Weckesser
On 7/14/13, Charles R Harris wrote: > Some corner cases in the mean, var, std. > > *Empty arrays* > > I think these cases should either raise an error or just return nan. > Warnings seem ineffective to me as they are only issued once by default. > > In [3]: ones(0).mean() > /home/charris/.local/li

Re: [Numpy-discussion] flip array on axis

2013-07-10 Thread Warren Weckesser
On Wed, Jul 10, 2013 at 12:03 PM, Andreas Hilboll wrote: > On 10.07.2013 17:06, Matthew Brett wrote: > > Hi, > > > > On Wed, Jul 10, 2013 at 11:02 AM, Andreas Hilboll > wrote: > >> Hi, > >> > >> there are np.flipud and np.fliplr methods to flip 2d arrays on the first > >> and second dimension, r

Re: [Numpy-discussion] TypeError when multiplying float64 and a big integer in Python 3.

2013-06-16 Thread Warren Weckesser
On Sun, Jun 16, 2013 at 12:56 PM, Warren Weckesser < warren.weckes...@gmail.com> wrote: > With Python 3.3.2 (64 bit), and numpy master: > > >>> import numpy as np > >>> np.__version__ > '1.8.0.dev-2a5c2c8' > > >>> f = np.float64(1

[Numpy-discussion] TypeError when multiplying float64 and a big integer in Python 3.

2013-06-16 Thread Warren Weckesser
With Python 3.3.2 (64 bit), and numpy master: >>> import numpy as np >>> np.__version__ '1.8.0.dev-2a5c2c8' >>> f = np.float64(1.0) >>> i = 2**65 >>> f*i Traceback (most recent call last): File "", line 1, in TypeError: unsupported operand type(s) for *: 'numpy.float64' and 'int' Is this the

Re: [Numpy-discussion] Seg. fault when running tests

2013-06-15 Thread Warren Weckesser
On Sat, Jun 15, 2013 at 4:03 PM, Julian Taylor < jtaylor.deb...@googlemail.com> wrote: > On 15.06.2013 21:57, Warren Weckesser wrote: > > > > On Sat, Jun 15, 2013 at 3:15 PM, Julian Taylor > > > @warren, can you please bisect the commit causing this? >

Re: [Numpy-discussion] Seg. fault when running tests

2013-06-15 Thread Warren Weckesser
On Sat, Jun 15, 2013 at 3:57 PM, Warren Weckesser < warren.weckes...@gmail.com> wrote: > > On Sat, Jun 15, 2013 at 3:15 PM, Julian Taylor < > jtaylor.deb...@googlemail.com> wrote: > >> On 15.06.2013 21:12, Charles R Harris wrote: >> > >> > >&g

Re: [Numpy-discussion] Seg. fault when running tests

2013-06-15 Thread Warren Weckesser
On Sat, Jun 15, 2013 at 3:15 PM, Julian Taylor < jtaylor.deb...@googlemail.com> wrote: > On 15.06.2013 21:12, Charles R Harris wrote: > > > > > > On Sat, Jun 15, 2013 at 9:50 AM, Warren Weckesser > > mailto:warren.weckes...@gmail.com>> wrote: > >

Re: [Numpy-discussion] Seg. fault when running tests

2013-06-15 Thread Warren Weckesser
On Sat, Jun 15, 2013 at 3:26 PM, Charles R Harris wrote: > > > On Sat, Jun 15, 2013 at 1:15 PM, Julian Taylor < > jtaylor.deb...@googlemail.com> wrote: > >> On 15.06.2013 21:12, Charles R Harris wrote: >> > >> > >> > On Sat, Jun 15, 2013

Re: [Numpy-discussion] Seg. fault when running tests

2013-06-15 Thread Warren Weckesser
On Sat, Jun 15, 2013 at 11:43 AM, Warren Weckesser < warren.weckes...@gmail.com> wrote: > I'm getting a seg. fault in master when I run the tests. I'm on Ubuntu > 12.04 64 bit, with Python 3.3.2 (64 bits): > > $ python3 -c "import numpy as np; np.test('

[Numpy-discussion] Seg. fault when running tests

2013-06-15 Thread Warren Weckesser
I'm getting a seg. fault in master when I run the tests. I'm on Ubuntu 12.04 64 bit, with Python 3.3.2 (64 bits): $ python3 -c "import numpy as np; np.test('full')" Running unit tests for numpy NumPy version 1.8.0.dev-fa5bc1c NumPy is installed in /home/warren/local_py332/lib/python3.3/site-packa

Re: [Numpy-discussion] weird problem with subtracting ndarrays

2013-06-12 Thread Warren Weckesser
On Wed, Jun 12, 2013 at 3:25 PM, Moroney, Catherine M (398D) < catherine.m.moro...@jpl.nasa.gov> wrote: > Hello, > > I've got two arrays of the same shape that I read in from a file, and I'm > trying to > difference them. Very simple stuff, but I'm getting weird answers. > > Here is the code: > >

Re: [Numpy-discussion] numpy.filled, again

2013-06-12 Thread Warren Weckesser
On Wed, Jun 12, 2013 at 2:00 PM, Nathaniel Smith wrote: > On 12 Jun 2013 18:20, "Ralf Gommers" wrote: > > > > > > > > > > On Wed, Jun 12, 2013 at 6:36 PM, Chris Barker - NOAA Federal < > chris.bar...@noaa.gov> wrote: > >> > >> On Wed, Jun 12, 2013 at 5:10 AM, Nathaniel Smith wrote: > >> > >> >

Re: [Numpy-discussion] numpy.filled, again

2013-06-12 Thread Warren Weckesser
On Wed, Jun 12, 2013 at 10:18 AM, Nathaniel Smith wrote: > On Wed, Jun 12, 2013 at 1:28 PM, Matthew Brett > wrote: > > On Wed, Jun 12, 2013 at 1:10 PM, Nathaniel Smith wrote: > >> Personally I think that overloading np.empty is horribly ugly, will > >> continue confusing newbies and everyone el

Re: [Numpy-discussion] numpy.filled, again

2013-06-12 Thread Warren Weckesser
On Wed, Jun 12, 2013 at 10:18 AM, Nathaniel Smith wrote: > On Wed, Jun 12, 2013 at 1:28 PM, Matthew Brett > wrote: > > On Wed, Jun 12, 2013 at 1:10 PM, Nathaniel Smith wrote: > >> Personally I think that overloading np.empty is horribly ugly, will > >> continue confusing newbies and everyone el

Re: [Numpy-discussion] numpy tests errors and failures

2013-06-04 Thread Warren Weckesser
On Tue, Jun 4, 2013 at 7:52 AM, Warren Weckesser wrote: > > On Tue, Jun 4, 2013 at 1:20 AM, Tim Burgess wrote: > >> On Sat, 2013-06-01 at 20:09 -0400, Warren Weckesser wrote: >> >> >> > I'm using Ubuntu 12.04, so I suspect I won't be the only

Re: [Numpy-discussion] numpy tests errors and failures

2013-06-04 Thread Warren Weckesser
On Tue, Jun 4, 2013 at 1:20 AM, Tim Burgess wrote: > On Sat, 2013-06-01 at 20:09 -0400, Warren Weckesser wrote: > > > > I'm using Ubuntu 12.04, so I suspect I won't be the only one who sees > > these. > > > gcc on 12.04 (precise) should be 4.6.3 >

Re: [Numpy-discussion] numpy tests errors and failures

2013-06-01 Thread Warren Weckesser
On Sat, Jun 1, 2013 at 8:56 PM, Warren Weckesser wrote: > > > > On Sat, Jun 1, 2013 at 7:47 PM, Charles R Harris < > charlesr.har...@gmail.com> wrote: > >> >> >> On Sat, Jun 1, 2013 at 4:50 PM, Warren Weckesser < >> warren.weckes...@gmail.com&

Re: [Numpy-discussion] numpy tests errors and failures

2013-06-01 Thread Warren Weckesser
On Sat, Jun 1, 2013 at 7:47 PM, Charles R Harris wrote: > > > On Sat, Jun 1, 2013 at 4:50 PM, Warren Weckesser < > warren.weckes...@gmail.com> wrote: > >> I'm getting a failure and two errors with the latest master branch: >> >> $ python -c "import

Re: [Numpy-discussion] numpy tests errors and failures

2013-06-01 Thread Warren Weckesser
On Sat, Jun 1, 2013 at 7:47 PM, Charles R Harris wrote: > > > On Sat, Jun 1, 2013 at 4:50 PM, Warren Weckesser < > warren.weckes...@gmail.com> wrote: > >> I'm getting a failure and two errors with the latest master branch: >> >> $ python -c "import

[Numpy-discussion] numpy tests errors and failures

2013-06-01 Thread Warren Weckesser
I'm getting a failure and two errors with the latest master branch: $ python -c "import numpy; numpy.test('full')" Running unit tests for numpy NumPy version 1.8.0.dev-dff8c94 NumPy is installed in /home/warren/local_numpy/lib/python2.7/site-packages/numpy Python version 2.7.4 |Anaconda 1.5.0 (64-

Re: [Numpy-discussion] multivariate_normal issue with 'size' argument

2013-05-24 Thread Warren Weckesser
On 5/24/13, Peter Cock wrote: > On Fri, May 24, 2013 at 3:02 PM, Warren Weckesser > wrote: >> On 5/24/13, Peter Cock wrote: >>>Warren wrote: >>>> Two more data points: >>>> On Ubuntu 12.04, using 64 bit builds of Python 2.7.4 (from Anaconda >>

Re: [Numpy-discussion] multivariate_normal issue with 'size' argument

2013-05-24 Thread Warren Weckesser
On 5/24/13, Warren Weckesser wrote: > On 5/24/13, Peter Cock wrote: >> On Fri, May 24, 2013 at 2:47 PM, Warren Weckesser >> wrote: >>> >>>Peter wrote: >>>> --- >>>> Successes >>>&g

Re: [Numpy-discussion] multivariate_normal issue with 'size' argument

2013-05-24 Thread Warren Weckesser
On 5/24/13, Peter Cock wrote: > On Fri, May 24, 2013 at 2:47 PM, Warren Weckesser > wrote: >> >>Peter wrote: >>> --- >>> Successes >>> --- >>> >>> 64 b

Re: [Numpy-discussion] multivariate_normal issue with 'size' argument

2013-05-24 Thread Warren Weckesser
On 5/24/13, Peter Cock wrote: > On Fri, May 24, 2013 at 2:15 PM, Robert Kern wrote: >> On Fri, May 24, 2013 at 9:12 AM, Peter Cock >> wrote: >>> On Fri, May 24, 2013 at 1:59 PM, Emanuele Olivetti >>> wrote: Interesting. Anyone able to reproduce what I observe? Emanuele >>> >>> >>

Re: [Numpy-discussion] multivariate_normal issue with 'size' argument

2013-05-24 Thread Warren Weckesser
On 5/24/13, Emanuele Olivetti wrote: > Interesting. Anyone able to reproduce what I observe? Yes. I'm also using Ubuntu 12.04. With numpy 1.6.1, I get the same error, but it works fine with numpy 1.7.1. Warren > > Emanuele > > On 05/24/2013 02:09 PM, Nicolas Rougier wrote: >> >> >> Works fo

Re: [Numpy-discussion] "Lists" and "Join" function needed

2013-05-04 Thread Warren Weckesser
On 5/4/13, Bakhtiyor Zokhidov wrote: > > Hi, > I have the following code which represents intersected point of each cell in > the given two points, A(x0,y0) and B(x1,y1). > > def intersected_points(x0, x1, y0, y1): > # slope > m = (y1 - y0 )/( x1 - x0) > # Boundary of the selected points > x_ceil

Re: [Numpy-discussion] nanmean(), nanstd() and other "missing" functions for 1.8

2013-05-01 Thread Warren Weckesser
On Wed, May 1, 2013 at 10:14 AM, Daπid wrote: > On 1 May 2013 03:36, Benjamin Root wrote: > > Are there any other functions that others feel are "missing" from numpy > and > > would like to see for v1.8? Let's discuss them here. > > I would like to have sincos, to compute sin and cos of the sam

Re: [Numpy-discussion] int to binary

2013-04-29 Thread Warren Weckesser
On 4/29/13, josef.p...@gmail.com wrote: > Is there a available function to convert an int to binary > representation as sequence of 0 and 1? > > > binary_repr produces strings and is not vectorized > np.binary_repr(5) > '101' np.binary_repr(5, width=4) > '0101' np.binary_repr(np.a

Re: [Numpy-discussion] timezones and datetime64

2013-04-03 Thread Warren Weckesser
On 4/3/13, Benjamin Root wrote: > On Wed, Apr 3, 2013 at 7:52 PM, Chris Barker - NOAA Federal < > chris.bar...@noaa.gov> wrote: > >> >> Personally, I never need finer resolution than seconds, nor more than >> a century, so it's no big deal to me, but just wondering >> >> > A use case for finer

Re: [Numpy-discussion] Add ability to disable the autogeneration of the function signature in a ufunc docstring.

2013-03-20 Thread Warren Weckesser
On Fri, Mar 15, 2013 at 4:39 PM, Nathaniel Smith wrote: > On Fri, Mar 15, 2013 at 6:47 PM, Warren Weckesser > wrote: > > Hi all, > > > > In a recent scipy pull request (https://github.com/scipy/scipy/pull/459), > I > > ran into the problem of ufuncs automaticall

[Numpy-discussion] Add ability to disable the autogeneration of the function signature in a ufunc docstring.

2013-03-15 Thread Warren Weckesser
Hi all, In a recent scipy pull request (https://github.com/scipy/scipy/pull/459), I ran into the problem of ufuncs automatically generating a signature in the docstring using arguments such as 'x' or 'x1, x2'. scipy.special has a lot of ufuncs, and for most of them, there are much more descriptiv

Re: [Numpy-discussion] Numpy 1.7.0 with Intel MKL 11.0.2.146

2013-03-10 Thread Warren Weckesser
On 3/10/13, Warren Weckesser wrote: > On 3/10/13, QT wrote: >> Dear all, >> >> I'm at my wits end. I've followed Intel's own >> instructions<http://software.intel.com/en-us/articles/numpyscipy-with-intel-mkl>on >> how to compile Numpy with

Re: [Numpy-discussion] Numpy 1.7.0 with Intel MKL 11.0.2.146

2013-03-10 Thread Warren Weckesser
On 3/10/13, QT wrote: > Dear all, > > I'm at my wits end. I've followed Intel's own > instructionson > how to compile Numpy with Intel MKL. Everything compiled and linked > fine and I've installed it locally in my user folder...

Re: [Numpy-discussion] step paramter for linspace

2013-03-01 Thread Warren Weckesser
On 3/1/13, Henry Gomersall wrote: > On Fri, 2013-03-01 at 13:34 +, Nathaniel Smith wrote: >> > My usual hack to deal with the numerical bounds issue is to >> add/subtract >> > half the step. >> >> Right. Which is exactly the sort of annoying, content-free code that a >> library is supposed to

Re: [Numpy-discussion] How to Keep An Array Two Dimensional

2012-11-25 Thread Warren Weckesser
On Sun, Nov 25, 2012 at 8:24 PM, Tom Bennett wrote: > Hi, > > I am trying to extract n columns from an 2D array and then operate on the > extracted columns. Below is the code: > > A is an MxN 2D array. > > u = A[:,:n] #extract the first n columns from A > > B = np.dot(u, u.T) #take outer product.

Re: [Numpy-discussion] strange behavior of numpy.unique

2012-11-07 Thread Warren Weckesser
On Wed, Nov 7, 2012 at 11:24 AM, wrote: > On Tue, Nov 6, 2012 at 9:52 PM, Warren Weckesser > wrote: > > > > > > On Tue, Nov 6, 2012 at 8:27 PM, Phillip Feldman > > wrote: > >> > >> numpy.unique behaves as I would expect for small inputs like th

Re: [Numpy-discussion] strange behavior of numpy.unique

2012-11-06 Thread Warren Weckesser
On Tue, Nov 6, 2012 at 8:27 PM, Phillip Feldman wrote: > numpy.unique behaves as I would expect for small inputs like the following: > > In [12]: x= [0, 0, 1, 0, 1, 2, 0, 1, 2, 3] > > In [13]: unique(x, return_index=True) > Out[13]: (array([0, 1, 2, 3]), array([0, 2, 5, 9], dtype=int64)) > > But,

Re: [Numpy-discussion] matrix norm

2012-10-22 Thread Warren Weckesser
On Mon, Oct 22, 2012 at 10:56 AM, Charles R Harris < charlesr.har...@gmail.com> wrote: > > > On Mon, Oct 22, 2012 at 9:44 AM, Jason Grout > wrote: > >> I'm curious why scipy/numpy defaults to calculating the Frobenius norm >> for matrices [1], when Matlab, Octave, and Mathematica all default to >

Re: [Numpy-discussion] set_printoptions precision and single floats

2012-10-06 Thread Warren Weckesser
On Sat, Oct 6, 2012 at 12:17 PM, Ralf Gommers wrote: > > > On Fri, Oct 5, 2012 at 5:17 PM, Dan Goodman wrote: > >> Hi, >> >> numpy.set_printoptions(precision=...) doesn't affect single floats, even >> if they are numpy floats rather than Python floats. Is this a bug or is >> there some reason for

Re: [Numpy-discussion] Obscure code in concatenate code path?

2012-09-13 Thread Warren Weckesser
On Thu, Sep 13, 2012 at 9:01 AM, Travis Oliphant wrote: > > On Sep 13, 2012, at 8:40 AM, Nathaniel Smith wrote: > > > On Thu, Sep 13, 2012 at 11:12 AM, Matthew Brett > wrote: > >> Hi, > >> > >> While writing some tests for np.concatenate, I ran foul of this code: > >> > >>if (axis >= NPY_MAXD

Re: [Numpy-discussion] sum and prod

2012-09-08 Thread Warren Weckesser
On Sat, Sep 8, 2012 at 4:56 PM, nicky van foreest wrote: > Hi, > > I ran the following code: > > args = np.array([4,8]) > print np.sum( (arg > 0) for arg in args) > print np.sum([(arg > 0) for arg in args]) > print np.prod( (arg > 0) for arg in args) > print

Re: [Numpy-discussion] numpy.fromfunction() doesn't work as expected?

2012-07-20 Thread Warren Weckesser
On Thu, Jul 19, 2012 at 5:52 AM, Cheng Li wrote: > Hi All, > > ** ** > > I have spot a strange behavior of numpy.fromfunction(). The sample codes > are as follows: > > >>> import numpy as np > > >>> def myOnes(i,j): > > return 1.0 > > >>> a = np.fromfunction(myO

Re: [Numpy-discussion] dot() function question

2012-06-27 Thread Warren Weckesser
On Wed, Jun 27, 2012 at 4:38 PM, wrote: > Hi list. > I have got completely cunfused with the numpy.dot() function. > dot(A,B) does: > - matrix multiplication if A and B are of MxN and NxK sizey > - dot product if A and B are of size M > How how can I perform matrix multiplication of two vectors?

Re: [Numpy-discussion] not expected output of fill_diagonal

2012-06-09 Thread Warren Weckesser
On Fri, Jun 8, 2012 at 7:45 PM, Frédéric Bastien wrote: > Hi, > > While reviewing the Theano op that wrap numpy.fill_diagonal, we found > an unexpected behavior of it: > > # as expected for square matrix > >>> a=numpy.zeros((5,5)) > >>> numpy.fill_diagonal(a, 10) > >>> print a > > # as expected l

[Numpy-discussion] SciPy 2012 Abstract and Tutorial Deadlines Extended

2012-04-30 Thread Warren Weckesser
SciPy 2012 Conference Deadlines Extended Didn't quite finish your abstract or tutorial yet? Good news: the SciPy 2012 organizers have extended the deadline until Friday, May 4. Proposals for tutorials and abstracts for talks and posters are now due by midnight (Austin time, CDT), May 4. For the

Re: [Numpy-discussion] SciPy 2012 - The Eleventh Annual Conference on Scientific Computing with Python

2012-04-27 Thread Warren Weckesser
, Warren Weckesser < warren.weckes...@enthought.com> wrote: > SciPy 2012, the eleventh annual Conference on Scientific Computing with > Python, will be held July 16–21, 2012, in Austin, Texas. > > At this conference, novel scientific applications and libraries related to > data

  1   2   3   >