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 stdin, line 1, in module
File
(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
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 opposite
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.188786
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 is the output
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 playing
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 was just
On Fri, Dec 11, 2009 at 12:50 AM, Nicolas Rougier
nicolas.roug...@loria.fr 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)
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 problem. It also tries
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
nicolas.roug...@loria.fr 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
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 attached a test file which
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
On 12/11/2009 10:21 AM, Keith Goodman wrote:
On Fri, Dec 11, 2009 at 12:50 AM, Nicolas Rougier
nicolas.roug...@loria.fr 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
On Fri, Dec 11, 2009 at 13:11, Bruce Southey bsout...@gmail.com 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
On 12/11/2009 01:33 PM, Robert Kern wrote:
On Fri, Dec 11, 2009 at 13:11, Bruce Southeybsout...@gmail.com 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
On Fri, Dec 11, 2009 at 12:08 PM, Bruce Southey bsout...@gmail.com wrote:
On 12/11/2009 01:33 PM, Robert Kern wrote:
On Fri, Dec 11, 2009 at 13:11, Bruce Southeybsout...@gmail.com wrote:
As documented, nan_to_num returns a float so it does not return the
input unchanged.
Sorry for my
On Fri, Dec 11, 2009 at 14:41, Keith Goodman kwgood...@gmail.com wrote:
On Fri, Dec 11, 2009 at 12:08 PM, Bruce Southey bsout...@gmail.com 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
On Fri, Dec 11, 2009 at 1:14 PM, Robert Kern robert.k...@gmail.com wrote:
On Fri, Dec 11, 2009 at 14:41, Keith Goodman kwgood...@gmail.com wrote:
On Fri, Dec 11, 2009 at 12:08 PM, Bruce Southey bsout...@gmail.com wrote:
So I agree that it should leave the input untouched when a non-float
On Fri, Dec 11, 2009 at 16:09, Keith Goodman kwgood...@gmail.com wrote:
On Fri, Dec 11, 2009 at 1:14 PM, Robert Kern robert.k...@gmail.com wrote:
On Fri, Dec 11, 2009 at 14:41, Keith Goodman kwgood...@gmail.com wrote:
On Fri, Dec 11, 2009 at 12:08 PM, Bruce Southey bsout...@gmail.com wrote:
On Fri, Dec 11, 2009 at 2:22 PM, Robert Kern robert.k...@gmail.com wrote:
On Fri, Dec 11, 2009 at 16:09, Keith Goodman kwgood...@gmail.com wrote:
On Fri, Dec 11, 2009 at 1:14 PM, Robert Kern robert.k...@gmail.com wrote:
On Fri, Dec 11, 2009 at 14:41, Keith Goodman kwgood...@gmail.com wrote:
On
On Fri, Dec 11, 2009 at 3:44 PM, Keith Goodman kwgood...@gmail.com wrote:
On Fri, Dec 11, 2009 at 2:22 PM, Robert Kern robert.k...@gmail.com wrote:
On Fri, Dec 11, 2009 at 16:09, Keith Goodman kwgood...@gmail.com wrote:
On Fri, Dec 11, 2009 at 1:14 PM, Robert Kern robert.k...@gmail.com wrote:
On Fri, Dec 11, 2009 at 17:44, Keith Goodman kwgood...@gmail.com wrote:
On Fri, Dec 11, 2009 at 2:22 PM, Robert Kern robert.k...@gmail.com wrote:
On Fri, Dec 11, 2009 at 16:09, Keith Goodman kwgood...@gmail.com wrote:
On Fri, Dec 11, 2009 at 1:14 PM, Robert Kern robert.k...@gmail.com wrote:
On
On Fri, Dec 11, 2009 at 18:03, Keith Goodman kwgood...@gmail.com 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
On Fri, Dec 11, 2009 at 4:06 PM, Robert Kern robert.k...@gmail.com wrote:
On Fri, Dec 11, 2009 at 17:44, Keith Goodman kwgood...@gmail.com wrote:
On Fri, Dec 11, 2009 at 2:22 PM, Robert Kern robert.k...@gmail.com wrote:
On Fri, Dec 11, 2009 at 16:09, Keith Goodman kwgood...@gmail.com wrote:
On
On Fri, Dec 11, 2009 at 18:38, Keith Goodman kwgood...@gmail.com 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):
Anne Archibald wrote:
2009/11/29 Dr. Phillip M. Feldman pfeld...@verizon.net:
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
On Fri, Dec 11, 2009 at 10:06 PM, Bruce Southey bsout...@gmail.com 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
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 wherever
On Fri, Dec 11, 2009 at 6:38 PM, Robert Kern robert.k...@gmail.com wrote:
On Fri, Dec 11, 2009 at 18:38, Keith Goodman kwgood...@gmail.com 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
29 matches
Mail list logo