On Mon, 2012-11-12 at 22:44 -0500, Alan G Isaac wrote:
On 11/12/2012 8:18 PM, Sebastian Berg wrote:
I have created a pull request
This is still a bit different than I thought you intended.
With `size=None` we don't get an element,
but rather a 0d array.
You are right, it should not be
On 11/9/2012 12:21 PM, Nathaniel Smith wrote:
you might want to double-check that the
np.random.choice in 1.7 actually*does* give an error if the input
array is not 1-d
Any idea where I can look at the code?
I browsed github after failing to find
a productive search string, but failed
to
Hey,
On Mon, 2012-11-12 at 08:48 -0500, Alan G Isaac wrote:
On 11/9/2012 12:21 PM, Nathaniel Smith wrote:
you might want to double-check that the
np.random.choice in 1.7 actually*does* give an error if the input
array is not 1-d
Any idea where I can look at the code?
I browsed
On Mon, Nov 12, 2012 at 2:48 PM, Alan G Isaac alan.is...@gmail.com wrote:
On 11/9/2012 12:21 PM, Nathaniel Smith wrote:
you might want to double-check that the
np.random.choice in 1.7 actually*does* give an error if the input
array is not 1-d
Any idea where I can look at the code?
I
On 11/12/2012 8:59 AM, Sebastian Berg wrote:
https://github.com/numpy/numpy/blob/master/numpy/random/mtrand/mtrand.pyx#L919
Sounds like it should be pretty simple to add axis=None which would
change the current behavior very little, it would stop give an error
anymore for none 1-d arrays
On Mon, Nov 12, 2012 at 3:50 PM, Alan G Isaac alan.is...@gmail.com wrote:
On 11/12/2012 8:59 AM, Sebastian Berg wrote:
https://github.com/numpy/numpy/blob/master/numpy/random/mtrand/mtrand.pyx#L919
Sounds like it should be pretty simple to add axis=None which would
change the current behavior
On 11/12/2012 10:00 AM, Nathaniel Smith wrote:
I don't really have an opinion on whether those
things should be supported, or what the right API should be; I haven't
really thought about it. Maybe others on the list have opinions. I was
just saying that we have plenty of time to decide about
In a comment on the issue https://github.com/numpy/numpy/issues/2724 Sebastian
notes:
it could also be reasonable to have size=None as default and have it return a
scalar/the given axes removed in that case. That would be a real change
in functionality unfortunately, but it would make sense for
On Mon, Nov 12, 2012 at 5:31 PM, Alan G Isaac alan.is...@gmail.com wrote:
In a comment on the issue https://github.com/numpy/numpy/issues/2724
Sebastian notes:
it could also be reasonable to have size=None as default and have it return
a scalar/the given axes removed in that case. That would
On Mon, 2012-11-12 at 17:52 +0100, Nathaniel Smith wrote:
On Mon, Nov 12, 2012 at 5:31 PM, Alan G Isaac alan.is...@gmail.com wrote:
In a comment on the issue https://github.com/numpy/numpy/issues/2724
Sebastian notes:
it could also be reasonable to have size=None as default and have it
On 11/12/2012 12:16 PM, Sebastian Berg wrote:
So instead of taking a sequence of length 1, take an element as default.
Sebastien has proposed that np.random.choice return
a single *element* by default, not a 1d array of length 1.
He proposes to associate this with a default value of
On Mon, Nov 12, 2012 at 11:34 PM, Alan G Isaac alan.is...@gmail.com wrote:
On 11/12/2012 12:16 PM, Sebastian Berg wrote:
So instead of taking a sequence of length 1, take an element as default.
Sebastien has proposed that np.random.choice return
a single *element* by default, not a 1d array
On 11/12/2012 5:46 PM, Nathaniel Smith wrote:
Want to make a pull request?
Well, I'd be happy to help Sebastien to change the
code, but I'm not a git user.
And I'd have some questions. E.g., with `size=None`,
couldn't we just call Python's random.choice? And for
sampling without replacement,
On Mon, 2012-11-12 at 18:36 -0500, Alan G Isaac wrote:
On 11/12/2012 5:46 PM, Nathaniel Smith wrote:
Want to make a pull request?
Well, I'd be happy to help Sebastien to change the
code, but I'm not a git user.
I have created a pull request, but tests are still needed... If you like
it
On 11/12/2012 8:18 PM, Sebastian Berg wrote:
I have created a pull request
This is still a bit different than I thought you intended.
With `size=None` we don't get an element,
but rather a 0d array.
I thought the idea was to return an element in this case?
Alan
15 matches
Mail list logo