slightly OT; but fwiw, its all ill-thought out nonsense from the start
anyway.
ALL numbers satisfy the predicate 0*x=0. what the IEEE calls 'not a
number' would be more accurately called 'not a specific number', or 'a
number'. whats a logical negation among computer scientists?
On Fri, Oct 3, 201
On Thu, Oct 2, 2014 at 11:56 PM, Sturla Molden wrote:
> Robert Kern wrote:
>
>> Yes, but that would require rewriting much of numpy.random to allow
>> replacing the core generator. This would work out-of-box because it's
>> just manipulating the state of the current core generator.
>
> Yes, then
On Thu, Oct 2, 2014 at 10:12 PM, Charles R Harris wrote:
>
>
> On Thu, Oct 2, 2014 at 9:29 PM, Nathaniel Smith wrote:
>
>> On Fri, Oct 3, 2014 at 3:20 AM, Charles R Harris
>> wrote:
>> >
>> > On Thu, Oct 2, 2014 at 7:06 PM, Benjamin Root wrote:
>> >>
>> >> Out[1] has an integer divided by an i
On Thu, Oct 2, 2014 at 9:29 PM, Nathaniel Smith wrote:
> On Fri, Oct 3, 2014 at 3:20 AM, Charles R Harris
> wrote:
> >
> > On Thu, Oct 2, 2014 at 7:06 PM, Benjamin Root wrote:
> >>
> >> Out[1] has an integer divided by an integer, and you can't represent nan
> >> as an integer. Perhaps somethin
On Fri, Oct 3, 2014 at 3:20 AM, Charles R Harris
wrote:
>
> On Thu, Oct 2, 2014 at 7:06 PM, Benjamin Root wrote:
>>
>> Out[1] has an integer divided by an integer, and you can't represent nan
>> as an integer. Perhaps something weird was happening with type promotion
>> between versions?
>
>
> Al
On 3 Oct 2014 07:09, "T J" wrote:
>
> Any bites on this?
>
> On Wed, Sep 24, 2014 at 12:23 PM, T J wrote:
>> Python's round function goes away from zero, so I am looking for the
NumPy equivalent (and using vectorize() seems undesirable). In this sense,
it seems that having a ufunc for this type o
On Thu, Oct 2, 2014 at 7:06 PM, Benjamin Root wrote:
> Out[1] has an integer divided by an integer, and you can't represent nan
> as an integer. Perhaps something weird was happening with type promotion
> between versions?
>
Also note that in python3 the '/' operator does float rather than integ
Out[1] has an integer divided by an integer, and you can't represent nan as
an integer. Perhaps something weird was happening with type promotion
between versions?
Ben Root
On Oct 2, 2014 7:02 PM, "T J" wrote:
> Hi, I'm using NumPy 1.8.2:
>
> In [1]: np.array(0) / np.array(0)
> Out[1]: 0
>
> In
Hi, I've built numpy 64 bit using vc11, the Intel Fortran compiler and the MKL
'mkl_rt' library.
*why? (see end of message for the reason, if interested)
Any advice or assistance would be greatly appreciated. If I can offer
additional information, I will happily do so.
The build appears to g
On Thu, Oct 2, 2014 at 4:29 PM, Charles R Harris
wrote:
>
>
> On Thu, Oct 2, 2014 at 5:02 PM, T J wrote:
>
>> Hi, I'm using NumPy 1.8.2:
>>
>> In [1]: np.array(0) / np.array(0)
>> Out[1]: 0
>>
>> In [2]: np.array(0) / np.array(0.0)
>> Out[2]: nan
>>
>> In [3]: np.array(0.0) / np.array(0)
>>
On Thu, Oct 2, 2014 at 5:02 PM, T J wrote:
> Hi, I'm using NumPy 1.8.2:
>
> In [1]: np.array(0) / np.array(0)
> Out[1]: 0
>
> In [2]: np.array(0) / np.array(0.0)
> Out[2]: nan
>
> In [3]: np.array(0.0) / np.array(0)
> Out[3]: nan
>
> In
Any bites on this?
On Wed, Sep 24, 2014 at 12:23 PM, T J wrote:
> Is there a ufunc for rounding away from zero? Or do I need to do
>
> x2 = sign(x) * ceil(abs(x))
>
> whenever I want to round away from zero? Maybe the following is better?
>
> x_ceil = ceil(x)
> x_floor = floor(x)
>
Hi, I'm using NumPy 1.8.2:
In [1]: np.array(0) / np.array(0)
Out[1]: 0
In [2]: np.array(0) / np.array(0.0)
Out[2]: nan
In [3]: np.array(0.0) / np.array(0)
Out[3]: nan
In [4]: np.array(0.0) / np.array(0.0)
Out[4]: nan
In [5]: 0/0
--
Robert Kern wrote:
> Yes, but that would require rewriting much of numpy.random to allow
> replacing the core generator. This would work out-of-box because it's
> just manipulating the state of the current core generator.
Yes, then we just need to sacrifice a year's worth of CPU time, and a PR
w
Thanks for the great input. The idea of implementing jump-ahead in
numpy.random would be a very nice feature, but I don't currently have
the time to work on implementing such a feature. For now, it seems
the simplest approach is to cache the RandomState and reuse that
later.
Brad
On Thu, Oct 2,
On Thu, Oct 2, 2014 at 9:52 PM, Sturla Molden wrote:
> Robert Kern wrote:
>
>> No one needs small jumps of arbitrary size. The real use case for
>> jumping is to make N parallel streams that won't overlap. You pick a
>> number, let's call it `jump_steps`, much larger than any single run of
>> you
Robert Kern wrote:
> No one needs small jumps of arbitrary size. The real use case for
> jumping is to make N parallel streams that won't overlap. You pick a
> number, let's call it `jump_steps`, much larger than any single run of
> your system could possibly consume (i.e. the number of core PRNG
On Thu, Oct 2, 2014 at 5:28 PM, Nathaniel Smith wrote:
> On 2 Oct 2014 16:52, "Robert Kern" wrote:
>>
>> On Thu, Oct 2, 2014 at 4:42 PM, Brad Buran wrote:
>> > Given the following:
>> >
>> > from numpy import random
>> > rs = random.RandomState(seed=1)
>> > # skip the first X billion samples
>>
aniel Smith
> Subject: Re: [Numpy-discussion] skip samples in random number
> generator
> To: Discussion of Numerical Python
> Message-ID:
> <
> capjvwbmzbqu-nyo1se6scvn+6eotw9mrzruwdkkuf188bgf...@mail.gmail.com>
> Content-Type: text/plain; charset=&
On 2 Oct 2014 16:52, "Robert Kern" wrote:
>
> On Thu, Oct 2, 2014 at 4:42 PM, Brad Buran wrote:
> > Given the following:
> >
> > from numpy import random
> > rs = random.RandomState(seed=1)
> > # skip the first X billion samples
> > x = rs.uniform(0, 10)
> >
> > How do I accomplish "skip the firs
On Thu, Oct 2, 2014 at 4:42 PM, Brad Buran wrote:
> Given the following:
>
> from numpy import random
> rs = random.RandomState(seed=1)
> # skip the first X billion samples
> x = rs.uniform(0, 10)
>
> How do I accomplish "skip the first X billion samples" (e.g. 7.2
> billion)? I see that there's
Given the following:
from numpy import random
rs = random.RandomState(seed=1)
# skip the first X billion samples
x = rs.uniform(0, 10)
How do I accomplish "skip the first X billion samples" (e.g. 7.2
billion)? I see that there's a numpy.random.RandomState.set_state
which accepts (among other par
On Thu, Oct 2, 2014 at 6:27 PM, Sebastian Wagner wrote:
> So, for non-structured arrays, the consens is an Exception. The question
> is, which one.
> AttributeError would be fully backwards compatible. Existing code checks
> for the method and if it exists, the object has fields.
> ValueError woul
So, for non-structured arrays, the consens is an Exception. The question
is, which one.
AttributeError would be fully backwards compatible. Existing code checks
for the method and if it exists, the object has fields.
ValueError would make more sense, as the value - the array - is in wrong
format/st
24 matches
Mail list logo