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

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,

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 >> >>

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

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

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 sturla.mol...@gmail.com wrote: Warren Weckesser warren.weckes...@gmail.com wrote: 0if x 0 heaviside(x) = 0.5 if x == 0 1if x 0 This is not correct. The discrete form of the Heaviside

[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 yw...@virginia.edu 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

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

2015-01-25 Thread Warren Weckesser
(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 equivalent of your desired table print grouping.count((x,y)) On Wed, Aug 13, 2014 at 11:25 PM, Warren Weckesser warren.weckes...@gmail.com wrote

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 the code I linked above. I still think

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

2015-01-05 Thread Warren Weckesser
On Mon, Jan 5, 2015 at 1:58 PM, Nathaniel Smith n...@pobox.com 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

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

2014-11-02 Thread Warren Weckesser
On Sat, Nov 1, 2014 at 4:41 PM, Alexander Belopolsky ndar...@mac.com 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. I can't recall ever

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

2014-11-02 Thread Warren Weckesser
On Sun, Nov 2, 2014 at 2:18 PM, Alexander Belopolsky ndar...@mac.com 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 first argument to genfromtxt

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

2014-11-02 Thread Warren Weckesser
On 11/2/14, Alexander Belopolsky ndar...@mac.com wrote: On Sun, Nov 2, 2014 at 2:32 PM, Warren Weckesser warren.weckes...@gmail.com wrote: Still, the case of dtype=None, name=None is problematic. Suppose I want genfromtxt() to detect the column names from the 1-st row and data types

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

2014-11-01 Thread Warren Weckesser
On 9/24/14, Alan G Isaac alan.is...@gmail.com 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

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 alan.is...@gmail.com 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 `skip_header

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

2014-11-01 Thread Warren Weckesser
On 11/1/14, Alan G Isaac alan.is...@gmail.com 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

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

2014-11-01 Thread Warren Weckesser
On 11/1/14, Alan G Isaac alan.is...@gmail.com 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_header. Sorry

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 n...@pobox.com wrote: On Sun, Oct 12, 2014 at 5:14 PM, Sebastian se...@sebix.at wrote: On 2014-10-12 16:54, Warren Weckesser wrote: On Sun, Oct 12, 2014 at 7:57 AM, Robert Kern robert.k...@gmail.com mailto:robert.k...@gmail.com wrote

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 n...@pobox.com wrote: On Thu, Oct 16, 2014 at 4:39 PM, Warren Weckesser warren.weckes...@gmail.com wrote: On Sun, Oct 12, 2014 at 9:13 PM, Nathaniel Smith n...@pobox.com wrote: Regarding names: shuffle/permutation is a terrible naming

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 robert.k...@gmail.com wrote: On Sat, Oct 11, 2014 at 11:51 PM, Warren Weckesser warren.weckes...@gmail.com wrote: A small wart in this API is the meaning of shuffle(a, independent=False, axis=None) It could be argued that the correct

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, josef.p...@gmail.com wrote: On Sun, Oct 12, 2014 at 10:54 AM, Warren Weckesser warren.weckes...@gmail.com wrote: On Sun, Oct 12, 2014 at 7:57 AM, Robert Kern robert.k...@gmail.com wrote: On Sat, Oct 11, 2014 at 11:51 PM, Warren Weckesser

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. Currently, `shuffle` shuffles the first

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.shuffle: https://github.com/numpy/numpy/issues

[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

[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
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

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

2014-08-13 Thread Warren Weckesser
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 warren.weckes...@gmail.com wrote: On Tue, Aug 12, 2014 at 12:51 PM, Eelco Hoogendoorn

[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]:

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 sequences. For example

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

2014-05-21 Thread Warren Weckesser
On 5/21/14, Siegfried Gonzi siegfried.go...@ed.ac.uk 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:

[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)

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 matthew.br...@gmail.comwrote: 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:

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, josef.p...@gmail.com 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

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

2014-02-19 Thread Warren Weckesser
On Tue, Feb 18, 2014 at 11:27 AM, Sebastian Berg sebast...@sipsolutions.net 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,

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 char...@crunch.iowrote: 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).

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

2013-12-20 Thread Warren Weckesser
On 12/20/13, Charles R Harris charlesr.har...@gmail.com 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. How do I checkout

[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

Re: [Numpy-discussion] (no subject)

2013-11-22 Thread Warren Weckesser
On Fri, Nov 22, 2013 at 4:23 PM, Matthew Brett matthew.br...@gmail.comwrote: 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

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

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 ndbeck...@gmail.com 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 =

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 ndbeck...@gmail.com wrote: David Goldsmith wrote: Is this a valid algorithm for generating a 3D Wiener process? (When I graph the results, they certainly

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 d.l.goldsm...@gmail.comwrote: 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

[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]:

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 The following show

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 fperez@gmail.com 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

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

2013-08-24 Thread Warren Weckesser
On 8/24/13, Tom Bennett tom.benn...@mail.zyzhu.net 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

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

2013-08-24 Thread Warren Weckesser
On 8/24/13, Warren Weckesser warren.weckes...@gmail.com wrote: On 8/24/13, Tom Bennett tom.benn...@mail.zyzhu.net 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

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

2013-08-24 Thread Warren Weckesser
` 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 On Sat, Aug 24, 2013 at 12:39 PM, Warren Weckesser warren.weckes...@gmail.com

[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 =

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

2013-08-20 Thread Warren Weckesser
On 8/20/13, rodrigo koblitz rodrigokobl...@gmail.com 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

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

2013-07-19 Thread Warren Weckesser
On 7/19/13, Yaroslav Halchenko li...@onerussian.com 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

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

2013-07-15 Thread Warren Weckesser
On 7/15/13, Moroney, Catherine M (398D) catherine.m.moro...@jpl.nasa.gov 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

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 charlesr.har...@gmail.com 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()

Re: [Numpy-discussion] flip array on axis

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

[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 stdin, line 1, in module TypeError: unsupported operand type(s) for *: 'numpy.float64' and 'int' Is this the

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.0) i = 2**65 f*i Traceback (most recent call last): File stdin, line 1

[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

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('full') Running unit tests for numpy NumPy

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 charlesr.har...@gmail.com 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 at 9:50 AM, Warren Weckesser warren.weckes

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 warren.weckes...@gmail.com mailto:warren.weckes...@gmail.com wrote: On Sat, Jun 15, 2013 at 11:43

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: On Sat, Jun 15, 2013 at 9:50 AM, Warren Weckesser warren.weckes

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? Here's the culprit

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

2013-06-12 Thread Warren Weckesser
On Wed, Jun 12, 2013 at 10:18 AM, Nathaniel Smith n...@pobox.com wrote: On Wed, Jun 12, 2013 at 1:28 PM, Matthew Brett matthew.br...@gmail.com wrote: On Wed, Jun 12, 2013 at 1:10 PM, Nathaniel Smith n...@pobox.com wrote: Personally I think that overloading np.empty is horribly ugly, will

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

2013-06-12 Thread Warren Weckesser
On Wed, Jun 12, 2013 at 10:18 AM, Nathaniel Smith n...@pobox.com wrote: On Wed, Jun 12, 2013 at 1:28 PM, Matthew Brett matthew.br...@gmail.com wrote: On Wed, Jun 12, 2013 at 1:10 PM, Nathaniel Smith n...@pobox.com wrote: Personally I think that overloading np.empty is horribly ugly, will

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

2013-06-12 Thread Warren Weckesser
On Wed, Jun 12, 2013 at 2:00 PM, Nathaniel Smith n...@pobox.com wrote: On 12 Jun 2013 18:20, Ralf Gommers ralf.gomm...@gmail.com 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

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 warren.weckes...@gmail.com wrote: On Tue, Jun 4, 2013 at 1:20 AM, Tim Burgess tim.burg...@noaa.gov 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

[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

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 charlesr.har...@gmail.comwrote: 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; numpy.test('full') Running

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 charlesr.har...@gmail.comwrote: 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; numpy.test('full') Running

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 warren.weckes...@gmail.com 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 wrote: I'm getting a failure and two

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

2013-05-24 Thread Warren Weckesser
On 5/24/13, Emanuele Olivetti emanu...@relativita.com 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

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

2013-05-24 Thread Warren Weckesser
On 5/24/13, Peter Cock p.j.a.c...@googlemail.com wrote: On Fri, May 24, 2013 at 2:15 PM, Robert Kern robert.k...@gmail.com wrote: On Fri, May 24, 2013 at 9:12 AM, Peter Cock p.j.a.c...@googlemail.com wrote: On Fri, May 24, 2013 at 1:59 PM, Emanuele Olivetti emanu...@relativita.com wrote:

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

2013-05-24 Thread Warren Weckesser
On 5/24/13, Peter Cock p.j.a.c...@googlemail.com wrote: On Fri, May 24, 2013 at 2:47 PM, Warren Weckesser warren.weckes...@gmail.com wrote: Peter wrote: --- Successes --- 64 bit Linux: $ python2.6 Python

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

2013-05-24 Thread Warren Weckesser
On 5/24/13, Peter Cock p.j.a.c...@googlemail.com wrote: On Fri, May 24, 2013 at 3:02 PM, Warren Weckesser warren.weckes...@gmail.com wrote: On 5/24/13, Peter Cock p.j.a.c...@googlemail.com wrote: Warren wrote: Two more data points: On Ubuntu 12.04, using 64 bit builds of Python 2.7.4 (from

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

2013-05-04 Thread Warren Weckesser
On 5/4/13, Bakhtiyor Zokhidov bakhtiyor_zokhi...@mail.ru 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

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 davidmen...@gmail.com wrote: On 1 May 2013 03:36, Benjamin Root ben.r...@ou.edu 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

Re: [Numpy-discussion] int to binary

2013-04-29 Thread Warren Weckesser
On 4/29/13, josef.p...@gmail.com 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'

Re: [Numpy-discussion] timezones and datetime64

2013-04-03 Thread Warren Weckesser
On 4/3/13, Benjamin Root ben.r...@ou.edu 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 n...@pobox.com wrote: On Fri, Mar 15, 2013 at 6:47 PM, Warren Weckesser warren.weckes...@gmail.com wrote: Hi all, In a recent scipy pull request (https://github.com/scipy/scipy/pull/459), I ran into the problem of ufuncs automatically

[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

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 rdirect...@gmail.com wrote: Dear all, I'm at my wits end. I've followed Intel's own instructionshttp://software.intel.com/en-us/articles/numpyscipy-with-intel-mklon how to compile Numpy with Intel MKL. Everything compiled and linked fine and I've installed it locally in my

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 warren.weckes...@gmail.com wrote: On 3/10/13, QT rdirect...@gmail.com wrote: Dear all, I'm at my wits end. I've followed Intel's own instructionshttp://software.intel.com/en-us/articles/numpyscipy-with-intel-mklon how to compile Numpy with Intel MKL. Everything

Re: [Numpy-discussion] step paramter for linspace

2013-03-01 Thread Warren Weckesser
On 3/1/13, Henry Gomersall h...@cantab.net 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 tom.benn...@mail.zyzhu.netwrote: 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)

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

2012-11-07 Thread Warren Weckesser
On Wed, Nov 7, 2012 at 11:24 AM, josef.p...@gmail.com wrote: On Tue, Nov 6, 2012 at 9:52 PM, Warren Weckesser warren.weckes...@gmail.com wrote: On Tue, Nov 6, 2012 at 8:27 PM, Phillip Feldman phillip.m.feld...@gmail.com wrote: numpy.unique behaves as I would expect for small inputs

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 phillip.m.feld...@gmail.com 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],

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 jason-s...@creativetrax.comwrote: I'm curious why scipy/numpy defaults to calculating the Frobenius norm for matrices [1], when Matlab, Octave, and Mathematica

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 ralf.gomm...@gmail.comwrote: On Fri, Oct 5, 2012 at 5:17 PM, Dan Goodman dg.gm...@thesamovar.netwrote: Hi, numpy.set_printoptions(precision=...) doesn't affect single floats, even if they are numpy floats rather than Python floats. Is this a

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 tra...@continuum.iowrote: On Sep 13, 2012, at 8:40 AM, Nathaniel Smith wrote: On Thu, Sep 13, 2012 at 11:12 AM, Matthew Brett matthew.br...@gmail.com wrote: Hi, While writing some tests for np.concatenate, I ran foul of this code:

Re: [Numpy-discussion] sum and prod

2012-09-08 Thread Warren Weckesser
On Sat, Sep 8, 2012 at 4:56 PM, nicky van foreest vanfore...@gmail.comwrote: 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)

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 scrappedprince...@gmail.comwrote: 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 =

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

2012-06-27 Thread Warren Weckesser
On Wed, Jun 27, 2012 at 4:38 PM, x.pi...@gmail.com 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

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 no...@nouiz.org 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 long

[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

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 acquisition, analysis

Re: [Numpy-discussion] Slices from an index list

2012-04-11 Thread Warren Weckesser
On Wed, Apr 11, 2012 at 4:28 AM, Mads Ipsen madsip...@gmail.com wrote: Hi, Suppose a have an array of indices, say indices = [0,1,2,3,5,7,8,9,10,12,13,14] Then the following slices a = slice(0,4) b = slice(4,5) c = slice(5,9) d = slice(9,12) provide information about all

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

2012-04-04 Thread Warren Weckesser
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 acquisition, analysis, dissemination and visualization using Python are presented.

Re: [Numpy-discussion] Possible roadmap addendum: building better text file readers

2012-03-20 Thread Warren Weckesser
On Tue, Mar 20, 2012 at 5:59 PM, Chris Barker chris.bar...@noaa.gov wrote: Warren et al: On Wed, Mar 7, 2012 at 7:49 AM, Warren Weckesser warren.weckes...@enthought.com wrote: If you are setup with Cython to build extension modules, I am and you don't mind testing an unreleased

Re: [Numpy-discussion] float96 on windows32 is float64?

2012-03-15 Thread Warren Weckesser
On Thu, Mar 15, 2012 at 11:41 PM, Val Kalatsky kalat...@gmail.com wrote: I does look like a joke. Here is print np.finfo(np.longdouble) In [2]: np.__version__ Out[2]: '1.6.1' In [3]: np.flo np.floatnp.float32 np.float_ np.floor np.float16 np.float64

  1   2   3   >