[Numpy-discussion] python-numpy debian package and f2py

2007-12-02 Thread Ondrej Certik
Hi,

I am a comaintainer of the python-scipy package in Debian and now it
seems to be in quite a good shape. However, the python-numpy package
is quite a mess, so as it usually goes in opensource, I got fedup and
I tried to clean it. But I noticed, that f2py was moved from external
package into numpy, however
the versions mishmatch:

The newest (deprecated) python-f2py package in Debian has a version
2.45.241+1926, so I assume this was the version of f2py, before
merging
with numpy. However, the f2py in numpy says when executing:

Version: 2_3816
numpy Version: 1.0.3

so I assume the version of f2py in numpy is 2_3816? So has the
versioning scheme of f2py changed? Another question - since both numpy
and f2py
is now built from the same source, doesn't f2py simply has the same
version as numpy, i.e. 1.0.3?  Note: I know there is a newer numpy
release, but that's
not the point now.

I am asking because we probably will have to remove the old
python-f2py package and build a new one from the sources of numpy,
etc., and it will
take some time until this happens (ftpmasters need to remove the old
package from the archive, then the new binary package needs to go to
the
NEW queue for approval etc.), so I would like to make sure I
understand the versioning and the future plans with numpy and f2py,
before starting
the transition in Debian.

Actually, does it even make sense to create a python-f2py package? It
seems so (to me), it's a separate program. But since you decided to
merge it
with numpy, what are your thoughts about it?

Thanks a lot,
Ondrej
___
Numpy-discussion mailing list
Numpy-discussion@scipy.org
http://projects.scipy.org/mailman/listinfo/numpy-discussion


[Numpy-discussion] random.hypergeometric bug

2007-12-02 Thread Chris
There appears to be a bug in numpy's hypergeometric
random number generator. Here is an example -- if I 
generate 1000 hg samples with 4 draws from a space
with 30 successes and 10 failures:

In [39]: x = hg(30, 10, 4, 1000)

I should get a mean value of:

In [40]: 4*30./40
Out[40]: 3.0

But the sample mean is way to small:

In [41]: mean(x)
Out[41]: 0.996



___
Numpy-discussion mailing list
Numpy-discussion@scipy.org
http://projects.scipy.org/mailman/listinfo/numpy-discussion


Re: [Numpy-discussion] Loading a GB file into array

2007-12-02 Thread Gael Varoquaux
On Sun, Dec 02, 2007 at 05:22:49PM -0800, Martin Spacek wrote:
 so I run python (with Andrew Straw's
 package VisionEgg) as a realtime priority process in windows on a dual
 core computer, which lets me reliably update the video frame buffer in
 time for the next refresh, without having to worry about windows
 multitasking butting in and stealing CPU cycles for the next 15-20ms.

Very interesting. Have you made measurements to see how many times you
lost one of your cycles. I made these kind of measurements on Linux using
the real-time clock with C and it was very interesting (
http://www.gael-varoquaux.info/computers/real-time ). I want to redo them
with Python, as I except to have similar results with Python. It would be
interesting to see how Windows fits in the picture (I know nothing about
Windows, so I really can't make measurements on Windows).

Cheers,

Gaƫl 
___
Numpy-discussion mailing list
Numpy-discussion@scipy.org
http://projects.scipy.org/mailman/listinfo/numpy-discussion


Re: [Numpy-discussion] random.hypergeometric bug

2007-12-02 Thread Robert Kern
Chris wrote:
 There appears to be a bug in numpy's hypergeometric
 random number generator. Here is an example -- if I 
 generate 1000 hg samples with 4 draws from a space
 with 30 successes and 10 failures:
 
 In [39]: x = hg(30, 10, 4, 1000)
 
 I should get a mean value of:
 
 In [40]: 4*30./40
 Out[40]: 3.0
 
 But the sample mean is way to small:
 
 In [41]: mean(x)
 Out[41]: 0.996

Fixed in r4527. My original source for the algorithm was incorrect, it seems.

-- 
Robert Kern

I have come to believe that the whole world is an enigma, a harmless enigma
 that is made terrible by our own mad attempt to interpret it as though it had
 an underlying truth.
  -- Umberto Eco
___
Numpy-discussion mailing list
Numpy-discussion@scipy.org
http://projects.scipy.org/mailman/listinfo/numpy-discussion