Re: [Numpy-discussion] Pull request review #3770: Trapezoidal distribution

2013-09-22 Thread josef . pktd
On Sat, Sep 21, 2013 at 1:55 PM, Jeremy Hetzel jthet...@gmail.com wrote: I've added a trapezoidal distribution to numpy.random for consideration, pull request 3770: https://github.com/numpy/numpy/pull/3770 Similar to the triangular distribution, the trapezoidal distribution may be used where

Re: [Numpy-discussion] Pull request review #3770: Trapezoidal distribution

2013-09-22 Thread Mark Szepieniec
On Sun, Sep 22, 2013 at 1:24 PM, josef.p...@gmail.com wrote: On Sat, Sep 21, 2013 at 1:55 PM, Jeremy Hetzel jthet...@gmail.com wrote: I've added a trapezoidal distribution to numpy.random for consideration, pull request 3770: https://github.com/numpy/numpy/pull/3770 Similar to the

[Numpy-discussion] Min Error

2013-09-22 Thread David Reed
Hi, I am getting a strange error when finding the minimum of a matrix. The weird thing is I get this while running within iPython shell, and if I do %debug and go to the line where this fails and run the command `a = np.min(D, axis=0)`, I get no error. Here is the trace: draw_lines/main.pyc

Re: [Numpy-discussion] Min Error

2013-09-22 Thread Sebastian Berg
On Sun, 2013-09-22 at 10:21 -0400, David Reed wrote: Hi, I am getting a strange error when finding the minimum of a matrix. The weird thing is I get this while running within iPython shell, and if I do %debug and go to the line where this fails and run the command `a = np.min(D,

Re: [Numpy-discussion] Min Error

2013-09-22 Thread David Reed
Thanks Sebastian, but still have same error. Also doesn't explain why it works when I run the same code at the debug prompt. Scratching my head on this one. Dave On Sun, Sep 22, 2013 at 10:42 AM, Sebastian Berg sebast...@sipsolutions.net wrote: On Sun, 2013-09-22 at 10:21 -0400, David Reed

Re: [Numpy-discussion] Min Error

2013-09-22 Thread David Reed
Sebastian, I apologize, that did work. I forgot to autoreload. Can you explain why the original code did work at the debug prompt? -Dave On Sun, Sep 22, 2013 at 10:45 AM, David Reed david.ree...@gmail.com wrote: Thanks Sebastian, but still have same error. Also doesn't explain why it

Re: [Numpy-discussion] Min Error

2013-09-22 Thread Sebastian Berg
On Sun, 2013-09-22 at 10:54 -0400, David Reed wrote: Sebastian, I apologize, that did work. I forgot to autoreload. Can you explain why the original code did work at the debug prompt? Probably the debug prompt clears the errors or such. There was a bug (it actually is already fixed in

[Numpy-discussion] Generating a (uniformly distributed) random bit list of length N

2013-09-22 Thread David Goldsmith
Is np.random.randint(2, size=N) the fastest way to do this? Thanks! DG ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] Generating a (uniformly distributed) random bit list of length N

2013-09-22 Thread Stéfan van der Walt
On 22 Sep 2013 23:04, David Goldsmith d.l.goldsm...@gmail.com wrote: Is np.random.randint(2, size=N) the fastest way to do this? Thanks! Are you concerned about speed or memory use? The operation you show should already be quite fast. A more memory efficient approach would be to generate