On Fri, Dec 11, 2009 at 6:38 PM, Robert Kern wrote:
> On Fri, Dec 11, 2009 at 18:38, Keith Goodman wrote:
>
>> That seems to work. To avoid changing the input
>>
x = np.array(1)
x.shape
>> ()
y = nan_to_num(x)
x.shape
>> (1,)
>>
>> I moved y = x.copy() further up and switc
> One thing to note is that dot uses optimized atlas if available, which
> makes it quite faster than equivalent operations you would do using
> purely numpy. I doubt that's the reason here, since the arrays are
> small, but that's something to keep in mind when performances matter:
> use dot where
On Fri, Dec 11, 2009 at 10:06 PM, Bruce Southey wrote:
>
> Having said that, the more you can vectorize your function, the more
> efficient it will likely be especially with Atlas etc.
One thing to note is that dot uses optimized atlas if available, which
makes it quite faster than equivalent op
Anne Archibald wrote:
>
> 2009/11/29 Dr. Phillip M. Feldman :
>
>> All of the statistical packages that I am currently using and have used
>> in
>> the past (Matlab, Minitab, R, S-plus) calculate standard deviation using
>> the
>> sqrt(1/(n-1)) normalization, which gives a result that is unbia
On Fri, Dec 11, 2009 at 18:38, Keith Goodman wrote:
> That seems to work. To avoid changing the input
>
>>> x = np.array(1)
>>> x.shape
> ()
>>> y = nan_to_num(x)
>>> x.shape
> (1,)
>
> I moved y = x.copy() further up and switched x's to y's. Here's what
> it looks like:
>
> def nan_to_num(x)
On Fri, Dec 11, 2009 at 4:06 PM, Robert Kern wrote:
> On Fri, Dec 11, 2009 at 17:44, Keith Goodman wrote:
>> On Fri, Dec 11, 2009 at 2:22 PM, Robert Kern wrote:
>>> On Fri, Dec 11, 2009 at 16:09, Keith Goodman wrote:
On Fri, Dec 11, 2009 at 1:14 PM, Robert Kern wrote:
> On Fri, Dec 11
On Fri, Dec 11, 2009 at 18:03, Keith Goodman wrote:
> Ack! The "if issubclass(t, _nx.inexact)" fix doesn't work. It solves
> the bool problem but it introduces its own problem since numpy.object_
> is not a subclass of inexact:
>
>>> nan_to_num([np.inf])
> array([ Inf])
Right. This is the prob
On Fri, Dec 11, 2009 at 17:44, Keith Goodman wrote:
> On Fri, Dec 11, 2009 at 2:22 PM, Robert Kern wrote:
>> On Fri, Dec 11, 2009 at 16:09, Keith Goodman wrote:
>>> On Fri, Dec 11, 2009 at 1:14 PM, Robert Kern wrote:
On Fri, Dec 11, 2009 at 14:41, Keith Goodman wrote:
> On Fri, Dec 11
On Fri, Dec 11, 2009 at 3:44 PM, Keith Goodman wrote:
> On Fri, Dec 11, 2009 at 2:22 PM, Robert Kern wrote:
>> On Fri, Dec 11, 2009 at 16:09, Keith Goodman wrote:
>>> On Fri, Dec 11, 2009 at 1:14 PM, Robert Kern wrote:
On Fri, Dec 11, 2009 at 14:41, Keith Goodman wrote:
> On Fri, Dec
On Fri, Dec 11, 2009 at 2:22 PM, Robert Kern wrote:
> On Fri, Dec 11, 2009 at 16:09, Keith Goodman wrote:
>> On Fri, Dec 11, 2009 at 1:14 PM, Robert Kern wrote:
>>> On Fri, Dec 11, 2009 at 14:41, Keith Goodman wrote:
On Fri, Dec 11, 2009 at 12:08 PM, Bruce Southey wrote:
>>>
> So I ag
On Fri, Dec 11, 2009 at 16:09, Keith Goodman wrote:
> On Fri, Dec 11, 2009 at 1:14 PM, Robert Kern wrote:
>> On Fri, Dec 11, 2009 at 14:41, Keith Goodman wrote:
>>> On Fri, Dec 11, 2009 at 12:08 PM, Bruce Southey wrote:
>>
So I agree that it should leave the input untouched when a non-floa
On Fri, Dec 11, 2009 at 1:14 PM, Robert Kern wrote:
> On Fri, Dec 11, 2009 at 14:41, Keith Goodman wrote:
>> On Fri, Dec 11, 2009 at 12:08 PM, Bruce Southey wrote:
>
>>> So I agree that it should leave the input untouched when a non-float
>>> dtype is used for some array-like input.
>>
>> Would
On Fri, Dec 11, 2009 at 14:41, Keith Goodman wrote:
> On Fri, Dec 11, 2009 at 12:08 PM, Bruce Southey wrote:
>> So I agree that it should leave the input untouched when a non-float
>> dtype is used for some array-like input.
>
> Would only one line need to be changed? Would changing
>
> if not i
On Fri, Dec 11, 2009 at 12:08 PM, Bruce Southey wrote:
> On 12/11/2009 01:33 PM, Robert Kern wrote:
>> On Fri, Dec 11, 2009 at 13:11, Bruce Southey wrote:
>>
>>
>>> As documented, nan_to_num returns a float so it does not return the
>>> input unchanged.
>>>
> Sorry for my mistake:
> Given an int
On 12/11/2009 01:33 PM, Robert Kern wrote:
> On Fri, Dec 11, 2009 at 13:11, Bruce Southey wrote:
>
>
>> As documented, nan_to_num returns a float so it does not return the
>> input unchanged.
>>
Sorry for my mistake:
Given an int input, np.nan_to_num returns an int dtype
>>> np.nan_to_n
On Fri, Dec 11, 2009 at 13:11, Bruce Southey wrote:
> As documented, nan_to_num returns a float so it does not return the
> input unchanged.
I think that is describing the current behavior rather than
documenting the intent of the function. Given the high level purpose
of the function, to "[r]ep
On 12/11/2009 10:21 AM, Keith Goodman wrote:
> On Fri, Dec 11, 2009 at 12:50 AM, Nicolas Rougier
> wrote:
>
>> Hello,
>>
>> Using both numpy 1.3.0 and 1.4.0rc1 I got the following exception using
>> nan_to_num on a bool array, is that the expected behavior ?
>>
>>
>>
> import numpy
Next Friday Enthought will be hosting our monthly Scientific Computing
with Python Webinar:
Summary of SciPy India
Friday December 18
1pm CST/ 7pm UTC
Register at GoToMeeting
Enthought President Travis Oliphant is currently in Kerala, India as
the keynote speaker at SciPy India 2009. Due to a
A Friday 11 December 2009 17:36:54 Bruce Southey escrigué:
> On 12/11/2009 10:03 AM, Francesc Alted wrote:
> > A Friday 11 December 2009 16:44:29 Dag Sverre Seljebotn escrigué:
> >> Jasper van de Gronde wrote:
> >>> Dag Sverre Seljebotn wrote:
> Jasper van de Gronde wrote:
> > I've attache
I've created a ticket (#1327).
Nicolas
On Dec 11, 2009, at 17:21 , Keith Goodman wrote:
> On Fri, Dec 11, 2009 at 12:50 AM, Nicolas Rougier
> wrote:
>>
>> Hello,
>>
>> Using both numpy 1.3.0 and 1.4.0rc1 I got the following exception using
>> nan_to_num on a bool array, is that the expected
On 12/11/2009 10:03 AM, Francesc Alted wrote:
> A Friday 11 December 2009 16:44:29 Dag Sverre Seljebotn escrigué:
>
>> Jasper van de Gronde wrote:
>>
>>> Dag Sverre Seljebotn wrote:
>>>
Jasper van de Gronde wrote:
> I've attached a test file which shows the
On Fri, Dec 11, 2009 at 12:50 AM, Nicolas Rougier
wrote:
>
> Hello,
>
> Using both numpy 1.3.0 and 1.4.0rc1 I got the following exception using
> nan_to_num on a bool array, is that the expected behavior ?
>
>
import numpy
Z = numpy.zeros((3,3),dtype=bool)
numpy.nan_to_num(Z)
> Trac
On Thu, Dec 10, 2009 at 05:19:24PM +0100, Gael Varoquaux wrote:
> On Thu, Dec 10, 2009 at 10:17:43AM -0600, Robert Kern wrote:
> > > OK, so we need to bug report to ubuntu. Anybody feels like doing it, or
> > > do I need to go ahead :).
> > It's your problem. :-)
> That's kinda what I thought. I
A Friday 11 December 2009 16:44:29 Dag Sverre Seljebotn escrigué:
> Jasper van de Gronde wrote:
> > Dag Sverre Seljebotn wrote:
> >> Jasper van de Gronde wrote:
> >>> I've attached a test file which shows the problem. It also tries adding
> >>> columns instead of rows (in case the memory layout is
Jasper van de Gronde wrote:
> Dag Sverre Seljebotn wrote:
>
>> Jasper van de Gronde wrote:
>>
>>> I've attached a test file which shows the problem. It also tries adding
>>> columns instead of rows (in case the memory layout is playing tricks),
>>> but this seems to make no difference. This
Dag Sverre Seljebotn wrote:
> Jasper van de Gronde wrote:
>> I've attached a test file which shows the problem. It also tries adding
>> columns instead of rows (in case the memory layout is playing tricks),
>> but this seems to make no difference. This is the output I got:
>>
>> Dot product: 5.
Jasper van de Gronde wrote:
> (Resending without attachment as I don't think my previous message arrived.)
>
> I just started using numpy and am very, very pleased with the
> functionality and cleanness so far. However, I tried what I though would
> be a simple optimization and found that the oppos
(Resending without attachment as I don't think my previous message arrived.)
I just started using numpy and am very, very pleased with the
functionality and cleanness so far. However, I tried what I though would
be a simple optimization and found that the opposite was true.
Specifically, I had a l
Hello,
Using both numpy 1.3.0 and 1.4.0rc1 I got the following exception using
nan_to_num on a bool array, is that the expected behavior ?
>>> import numpy
>>> Z = numpy.zeros((3,3),dtype=bool)
>>> numpy.nan_to_num(Z)
Traceback (most recent call last):
File "", line 1, in
File "/usr/lib/py
29 matches
Mail list logo