[Numpy-discussion] Behavior of np.random.uniform

2016-01-19 Thread Jaime Fernández del Río
Hi all, There is a PR (#7026 ) that documents the current behavior of np.random.uniform when the low and high parameters it takes do not conform to the expected low < high. Basically: - if low < high, random numbers are drawn from [low, high), - if

Re: [Numpy-discussion] Behavior of np.random.uniform

2016-01-19 Thread Benjamin Root
Are there other functions where this behavior may or may not be happening? If it isn't consistent across all np.random functions, it probably should be, one way or the other. Ben Root On Tue, Jan 19, 2016 at 5:10 AM, Jaime Fernández del Río < jaime.f...@gmail.com> wrote: > Hi all, > > There is a

Re: [Numpy-discussion] Behavior of np.random.uniform

2016-01-19 Thread G Young
Of the methods defined in *numpy/mtrand.pyx* (excluding helper functions and *random_integers*, as they are all related to *randint*), *randint* is the only other function with *low* and *high* parameters. However, it enforces *high* > *low*. Greg On Tue, Jan 19, 2016 at 1:36 PM, Benjamin Root

Re: [Numpy-discussion] Behavior of np.random.uniform

2016-01-19 Thread Marten van Kerkwijk
For what it is worth, the current behaviour seems the most logical to me, i.e., that the first limit is always the one that is included in the interval, and the second is not. -- Marten ​ ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org https:

Re: [Numpy-discussion] Behavior of np.random.uniform

2016-01-19 Thread G Young
In rand range, it raises an exception if low >= high. I should also add that AFAIK enforcing low >= high with floats is a lot trickier than it is for integers. I have been knee-deep in corner cases for some time with *randint* where numbers that are visually different are cast as the same number

Re: [Numpy-discussion] Behavior of np.random.uniform

2016-01-19 Thread Chris Barker - NOAA Federal
What does the standard lib do for rand range? I see that randint Is closed on both ends, so order doesn't matter, though if it raises for b wrote: Of the methods defined in *numpy/mtrand.pyx* (excluding helper functions and *random_integers*, as they are all related to *randint*), *randint* is the

Re: [Numpy-discussion] Should I use pip install numpy in linux?

2016-01-19 Thread Chris Barker - NOAA Federal
> Last month, numpy had ~740,000 downloads from PyPI, Hm, given that Windows and Linux wheels have not been available, then that's mostly source installs anyway. Or failed installs -- no shortage of folks trying to pip install numpy on Windows and then having questions about why it doesn't work.

Re: [Numpy-discussion] Should I use pip install numpy in linux?

2016-01-19 Thread Chris Barker
hmm -- didn't mean to rev this up quite so much -- sorry! But it's a good conversation to have, so... On Fri, Jan 15, 2016 at 1:08 PM, Benjamin Root wrote: > That being said... I take exception to your assertion that anaconda is > *the* solution to the packaging problem. > I think we need to

Re: [Numpy-discussion] Behavior of np.random.uniform

2016-01-19 Thread Alan G Isaac
In principle, if we are describing an *interval*, that is the right thing to do: https://en.wikipedia.org/wiki/Interval_(mathematics)#Including_or_excluding_endpoints Alan Isaac On 1/19/2016 9:21 AM, G Young wrote: Of the methods defined in *numpy/mtrand.pyx* (excluding helper functions and *

Re: [Numpy-discussion] Behavior of np.random.uniform

2016-01-19 Thread Charles R Harris
On Tue, Jan 19, 2016 at 9:23 AM, Chris Barker - NOAA Federal < chris.bar...@noaa.gov> wrote: > What does the standard lib do for rand range? I see that randint Is closed > on both ends, so order doesn't matter, though if it raises for b that's a precedent we could follow. > randint is not closed

Re: [Numpy-discussion] Behavior of np.random.uniform

2016-01-19 Thread Charles R Harris
On Tue, Jan 19, 2016 at 10:27 AM, Charles R Harris < charlesr.har...@gmail.com> wrote: > > > On Tue, Jan 19, 2016 at 9:23 AM, Chris Barker - NOAA Federal < > chris.bar...@noaa.gov> wrote: > >> What does the standard lib do for rand range? I see that randint Is >> closed on both ends, so order does

Re: [Numpy-discussion] Behavior of np.random.uniform

2016-01-19 Thread Sebastian Berg
On Di, 2016-01-19 at 16:28 +, G Young wrote: > In rand range, it raises an exception if low >= high. > > I should also add that AFAIK enforcing low >= high with floats is a > lot trickier than it is for integers. I have been knee-deep in > corner cases for some time with randint where numbers

Re: [Numpy-discussion] Behavior of np.random.uniform

2016-01-19 Thread Robert Kern
On Tue, Jan 19, 2016 at 5:27 PM, Charles R Harris wrote: > > On Tue, Jan 19, 2016 at 9:23 AM, Chris Barker - NOAA Federal < chris.bar...@noaa.gov> wrote: >> >> What does the standard lib do for rand range? I see that randint Is closed on both ends, so order doesn't matter, though if it raises for

Re: [Numpy-discussion] Behavior of np.random.uniform

2016-01-19 Thread Charles R Harris
On Tue, Jan 19, 2016 at 10:36 AM, Robert Kern wrote: > On Tue, Jan 19, 2016 at 5:27 PM, Charles R Harris < > charlesr.har...@gmail.com> wrote: > > > > > On Tue, Jan 19, 2016 at 9:23 AM, Chris Barker - NOAA Federal < > chris.bar...@noaa.gov> wrote: > >> > >> What does the standard lib do for rand

Re: [Numpy-discussion] Behavior of np.random.uniform

2016-01-19 Thread Robert Kern
On Tue, Jan 19, 2016 at 5:36 PM, Robert Kern wrote: > > On Tue, Jan 19, 2016 at 5:27 PM, Charles R Harris < charlesr.har...@gmail.com> wrote: > > > > > On Tue, Jan 19, 2016 at 9:23 AM, Chris Barker - NOAA Federal < chris.bar...@noaa.gov> wrote: > >> > >> What does the standard lib do for rand rang

Re: [Numpy-discussion] Behavior of np.random.uniform

2016-01-19 Thread Robert Kern
On Tue, Jan 19, 2016 at 5:40 PM, Charles R Harris wrote: > > On Tue, Jan 19, 2016 at 10:36 AM, Robert Kern wrote: >> >> On Tue, Jan 19, 2016 at 5:27 PM, Charles R Harris < charlesr.har...@gmail.com> wrote: >> > >> >> > On Tue, Jan 19, 2016 at 9:23 AM, Chris Barker - NOAA Federal < chris.bar...@no

Re: [Numpy-discussion] Behavior of np.random.uniform

2016-01-19 Thread Charles R Harris
On Tue, Jan 19, 2016 at 10:42 AM, Robert Kern wrote: > On Tue, Jan 19, 2016 at 5:40 PM, Charles R Harris < > charlesr.har...@gmail.com> wrote: > > > > On Tue, Jan 19, 2016 at 10:36 AM, Robert Kern > wrote: > >> > >> On Tue, Jan 19, 2016 at 5:27 PM, Charles R Harris < > charlesr.har...@gmail.com>

Re: [Numpy-discussion] Behavior of np.random.uniform

2016-01-19 Thread josef.pktd
On Tue, Jan 19, 2016 at 12:43 PM, Charles R Harris < charlesr.har...@gmail.com> wrote: > > > On Tue, Jan 19, 2016 at 10:42 AM, Robert Kern > wrote: > >> On Tue, Jan 19, 2016 at 5:40 PM, Charles R Harris < >> charlesr.har...@gmail.com> wrote: >> > >> > On Tue, Jan 19, 2016 at 10:36 AM, Robert Kern

Re: [Numpy-discussion] Behavior of np.random.uniform

2016-01-19 Thread Chris Barker
On Tue, Jan 19, 2016 at 9:27 AM, Charles R Harris wrote: > On Tue, Jan 19, 2016 at 9:23 AM, Chris Barker - NOAA Federal < > chris.bar...@noaa.gov> wrote: > >> What does the standard lib do for rand range? I see that randint Is >> closed on both ends, so order doesn't matter, though if it raises f

Re: [Numpy-discussion] Should I use pip install numpy in linux?

2016-01-19 Thread Ralf Gommers
On Tue, Jan 19, 2016 at 5:57 PM, Chris Barker - NOAA Federal < chris.bar...@noaa.gov> wrote: > > > 2) continue to support those users fairly poorly, and at substantial > > ongoing cost > > I'm curious what the cost is for this poor support -- throw the source > up on PyPi, and we're done. The cost

Re: [Numpy-discussion] FeatureRequest: support for array construction from iterators

2016-01-19 Thread Stephan Sahm
just to not prevent it from the black hole - what about integrating fromiter into array? (see the post by Benjamin Root) for me personally, taking the first element for deducing the dtype would be a perfect default way to read generators. If one wants a specific other dtype, one could specify it l

[Numpy-discussion] maintenance/1.11.x branched

2016-01-19 Thread Charles R Harris
Hi All, I've branched 1.11.x. There is still work to be done, but the branch draws the line for PRs to be included in 1.11. Experience teaches that fixups will needed, but new work/enhancements will be in 1.12.0-dev0. Please run tests on this branch if you have the time. Travis CI has begun fail