Re: [Numpy-discussion] New release of pycdf package ported to NumPy

2007-02-21 Thread George Nurser
Hi Andre, I've downloaded bpycdf and it works very nicely with numpy; thanks very much for all your effort. One small problem; I'm probably being stupid, but I cannot see how to set a _Fillvalue as Float32. regards, George Nurser. On 12/02/07, Andre Gosselin [EMAIL PROTECTED] wrote: A small

[Numpy-discussion] installation documentation

2007-02-21 Thread Toon Knapen
Hi all, Is there detailed info on the installation process available. I'm asking because in addition to installing numpy on linux-x86, I'm also trying to install numpy on aix-power and windows-x86. So before bombarding the ml with questions, I would like to get my hands on all doc available

[Numpy-discussion] Managing Rolling Data

2007-02-21 Thread Alexander Michael
I'm new to numpy and looking for advice on setting up and managing array data for my particular problem. I'm collecting observations of P properties for N objects over a rolling horizon of H sample times. I could conceptually store the data in three-dimensional array with shape (N,P,H) that would

Re: [Numpy-discussion] Greek Letters

2007-02-21 Thread Chris Barker
Andrew Straw wrote: Here's one that seems like it might work, but I haven't tried it yet: http://software.jessies.org/terminator Now if only there was a decent terminal emulator for Windows that didn't use cygwin... -Chris -- Christopher Barker, Ph.D. Oceanographer Emergency Response

Re: [Numpy-discussion] [Matplotlib-users] [matplotlib-devel] Unifying numpy, scipy, and matplotlib docstring formats

2007-02-21 Thread Chris Barker
There's probably a better forum for this conversation, but... Barry Wark wrote: Perhaps we should consider two use cases: interactive use ala Matlab and larger code bases. A couple key points -- yes, interactive use is different than larger code bases, but I think it's a Bad Idea to promite

[Numpy-discussion] what goes wrong with cos(), sin()

2007-02-21 Thread WolfgangZillig
Hi, I'm quite new to numpy/scipy so please excuse if my problem is too obvious. example code: import numpy as n print n.sin(n.pi) print n.cos(n.pi/2.0) results in: 1.22460635382e-016 6.12303176911e-017 I've expected something around 0. Can anybody explain what I am doing wrong here?

Re: [Numpy-discussion] what goes wrong with cos(), sin()

2007-02-21 Thread Charles R Harris
On 2/21/07, WolfgangZillig [EMAIL PROTECTED] wrote: Hi, I'm quite new to numpy/scipy so please excuse if my problem is too obvious. example code: import numpy as n print n.sin(n.pi) print n.cos(n.pi/2.0) results in: 1.22460635382e-016 6.12303176911e-017 I've expected something around 0.

Re: [Numpy-discussion] what goes wrong with cos(), sin()

2007-02-21 Thread Zachary Pincus
Your results are indeed around zero. numpy.allclose(0, 1.22460635382e-016) True It's not exactly zero because floating point math is in general not exact. You'll need to check out a reference about doing floating point operations numerically for more details, but in general you should

Re: [Numpy-discussion] Managing Rolling Data

2007-02-21 Thread Mike Ressler
On 2/21/07, Alexander Michael [EMAIL PROTECTED] wrote: ... T is to large to fit in memory, so I need to load up H, perform my calculations, pop the oldest N x P slice and push the newest N x P slice into the data cube. What's the best way to do this that will maintain fast computations along

Re: [Numpy-discussion] what goes wrong with cos(), sin()

2007-02-21 Thread David Goldsmith
As far as a computer is concerned, those numbers are around zero - growing-up w/ Matlab, e.g., one quickly learns to recognize these numbers for what they are. One way to return zero for numbers like these is if numpy.allclose(x, 0): return 0 (or 0*x to assure that 0 is the same type as x),

Re: [Numpy-discussion] what goes wrong with cos(), sin()

2007-02-21 Thread David Goldsmith
Anne Archibald wrote: On 21/02/07, Zachary Pincus [EMAIL PROTECTED] wrote: A corrolary: in general do not two floating-point values for equality -- use something like numpy.allclose. (Exception -- equality is expected if the exact sequence of operations to generate two numbers were

Re: [Numpy-discussion] installation documentation

2007-02-21 Thread Travis Oliphant
Toon Knapen wrote: Hi all, Is there detailed info on the installation process available. I'm asking because in addition to installing numpy on linux-x86, I'm also trying to install numpy on aix-power and windows-x86. So before bombarding the ml with questions, I would like to get my hands on

Re: [Numpy-discussion] what goes wrong with cos(), sin()

2007-02-21 Thread Robert Kern
Christopher Barker wrote: I wonder if there are any C math libs that do a better job than you'd expect from standard FP? (short of unlimited precision ones) With respect to π and the zeros of sin() and cos()? Not really. If numpy.sin(numpy.pi) were to give you 0.0, it would be *wrong*.

Re: [Numpy-discussion] what goes wrong with cos(), sin()

2007-02-21 Thread David Goldsmith
Robert Kern wrote: Christopher Barker wrote: I wonder if there are any C math libs that do a better job than you'd expect from standard FP? (short of unlimited precision ones) With respect to π and the zeros of sin() and cos()? Not really. If numpy.sin(numpy.pi) were to give you

Re: [Numpy-discussion] what goes wrong with cos(), sin()

2007-02-21 Thread Christopher Barker
Robert Kern wrote: Christopher Barker wrote: I wonder if there are any C math libs that do a better job than you'd expect from standard FP? (short of unlimited precision ones) With respect to π and the zeros of sin() and cos()? Not really. If numpy.sin(numpy.pi) were to give you 0.0, it

Re: [Numpy-discussion] what goes wrong with cos(), sin()

2007-02-21 Thread Robert Kern
Christopher Barker wrote: Robert Kern wrote: Christopher Barker wrote: I wonder if there are any C math libs that do a better job than you'd expect from standard FP? (short of unlimited precision ones) With respect to π and the zeros of sin() and cos()? Not really. I'll back off on this a

Re: [Numpy-discussion] what goes wrong with cos(), sin()

2007-02-21 Thread Anne Archibald
On 21/02/07, Robert Kern [EMAIL PROTECTED] wrote: Well, you can always use long double if it is implemented on your platform. You will have to construct a value for π yourself, though. I'm afraid that we don't really make that easy. If the trig functions are implemented at all, you can

Re: [Numpy-discussion] Managing Rolling Data

2007-02-21 Thread Timothy Hochberg
If none of the suggested methods turn out to be efficient enough due to copying overhead, here's a way to reduce the copying overhead by trading memory (and a bit of complexity) for copying overhead. The general thrust is to allocate M extra slices of memory and then shift the data every M time

Re: [Numpy-discussion] what goes wrong with cos(), sin()

2007-02-21 Thread Charles R Harris
On 2/21/07, Robert Kern [EMAIL PROTECTED] wrote: Christopher Barker wrote: Robert Kern wrote: Christopher Barker wrote: I wonder if there are any C math libs that do a better job than you'd expect from standard FP? (short of unlimited precision ones) With respect to π and the zeros of

Re: [Numpy-discussion] what goes wrong with cos(), sin()

2007-02-21 Thread Timothy Hochberg
On 2/21/07, Charles R Harris [EMAIL PROTECTED] wrote: On 2/21/07, Robert Kern [EMAIL PROTECTED] wrote: Christopher Barker wrote: Robert Kern wrote: Christopher Barker wrote: I wonder if there are any C math libs that do a better job than you'd expect from standard FP? (short of

Re: [Numpy-discussion] Distributing prebuilt numpy and other extensions

2007-02-21 Thread Russell E. Owen
In article [EMAIL PROTECTED], Zachary Pincus [EMAIL PROTECTED] wrote: Hello folks, I've developed some command-line tools for biologists using python/ numpy and some custom C and Fortran extensions, and I'm trying to figure out how to easily distribute them... For people using linux,

Re: [Numpy-discussion] what goes wrong with cos(), sin()

2007-02-21 Thread Charles R Harris
On 2/21/07, Timothy Hochberg [EMAIL PROTECTED] wrote: On 2/21/07, Charles R Harris [EMAIL PROTECTED] wrote: On 2/21/07, Robert Kern [EMAIL PROTECTED] wrote: Christopher Barker wrote: Robert Kern wrote: Christopher Barker wrote: I wonder if there are any C math libs that do a

Re: [Numpy-discussion] what goes wrong with cos(), sin()

2007-02-21 Thread Charles R Harris
On 2/21/07, Charles R Harris [EMAIL PROTECTED] wrote: On 2/21/07, Timothy Hochberg [EMAIL PROTECTED] wrote: On 2/21/07, Charles R Harris [EMAIL PROTECTED] wrote: On 2/21/07, Robert Kern [EMAIL PROTECTED] wrote: Christopher Barker wrote: Robert Kern wrote: