Re: [Numpy-discussion] Citing Numeric and numpy

2007-08-30 Thread Peter
Thank you Ryan  Alan for the feedback - the three references are 
summarized here for anyone searching for the citations in future.

The recent overview was:

Travis E. Oliphant, Python for Scientific Computing, Computing in
Science  Engineering, vol. 9, no. 3, May/June 2007, pp. 10-20.

Numerical Python citation, available online at: 
http://numpy.scipy.org/numpydoc/numpy.html

D. Ascher et al., Numerical Python, tech. report UCRL-MA-128569,
Lawrence Livermore National Laboratory, 2001; http://numpy.scipy.org.

NumPy book citation, see also http://www.tramy.us for details:

Travis E. Oliphant (2006) Guide to NumPy, Trelgol Publishing, USA;
http://numpy.scipy.org.

Cheers,

Peter

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


Re: [Numpy-discussion] Error code of NumpyTest()

2007-08-30 Thread Pearu Peterson
On Fri, August 24, 2007 11:41 am, Matthieu Brucher wrote:
 Hi,

 I wondered if there was a way of returning another error code than 0 when
 executing the test suite so that a parent process can immediately know if
 all the tests passed or not.
 The numpy buildbot seems to have the same behaviour BTW.
 I don't know if it is possible, but it would be great.

The svn version of test() function now returns TestResult object.

So, test() calls in buildbot should read:

  import numpy,sys; sys.exit(not
numpy.test(verbosity=,level=).wasSuccessful())

Hopefully buildbot admins can update the test commands accordingly.

Pearu

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


Re: [Numpy-discussion] Error code of NumpyTest()

2007-08-30 Thread Matthieu Brucher
Thank you for the answer


The svn version of test() function now returns TestResult object.



Numpy 1.3.x does not provide this ? I can't upgrade the numpy packages on
the Linux boxes (on the Windows box, I suppose that I could use an Enthought
egg).


So, test() calls in buildbot should read:

   import numpy,sys; sys.exit(not
 numpy.test(verbosity=,level=).wasSuccessful())

 Hopefully buildbot admins can update the test commands accordingly.


I'll be able to do this as the tests are located on the repository.

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


[Numpy-discussion] Units; was Bug or surprising undocumented behaviour in irfft

2007-08-30 Thread Bryan Van de Ven

 Do you know if there's a current package to associate units with numpy
 arrays? For my purposes it would usually be sufficient to have arrays
 of quantities with uniform units. Conversions need only be
 multiplicative (I don't care about Celsius-to-Fahrenheit style
 conversions) and need not even be automatic, though of course that
 would be convenient. Right now I use Frink for that sort of thing, but
 it would have saved me from making a number of minor mistakes in
 several pieces of python code I've written.

Anne,

We have an enthought.units package in ETS, and for unit-ed numpy arrays we have 
(fairly new) UnitArray and UnitScalar in enthought.numerical_modeling.units.api 
Automatic conversions on arithmetic expressions are not performed; however, we 
do have a @has_units function decorator that will perform unit conversions on 
function inputs automatically (and will label--but not convert--the outputs of 
a 
function) If you are interested in checking it out I can get you more 
information/examples.

Bryan

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


[Numpy-discussion] Accessing a numpy array in a mmap fashion

2007-08-30 Thread Brian Donovan
Hello all,

  I'm wondering if there is a way to use a numpy array that uses disk as a
memory store rather than ram. I'm looking for something like mmap but which
can be used like a numpy array. The general idea is this. I'm simulating a
system which produces a large dataset over a few hours of processing time.
Rather than store the numpy array in memory during processing I'd like to
write the data directly to disk but still be able to treat the array as a
numpy array. Is this possible? Any ideas?

Thanks,

Brian
--
Brian Donovan
Research Assistant
Microwave Remote Sensing Lab
UMass Amherst
___
Numpy-discussion mailing list
Numpy-discussion@scipy.org
http://projects.scipy.org/mailman/listinfo/numpy-discussion


[Numpy-discussion] numpy build fails on powerpc ydl

2007-08-30 Thread Vincent Broman
My build of numpy fails under Yellow Dog Linux 2.1,
running on a powerpc multiprocessor board from Curtiss-Wright.

Its kernel is 2.4.19-Asmp tailored by the vendor.
The gcc compiler is configured as ppc-yellowdog-linux with
version number 2.95.3 20010111.
The python I'm using is Python 2.5.1 (r251:54863) installed as python2.
Plain /usr/bin/python is 1.5.x .
The numpy version I'm trying to build is r4003 for v1.0.4 .

The setup fails compiling build/src.linux-ppc-2.5/numpy/core/src/umathmodule.c
with a long list of error messages of the following two kinds.

warning: conflicting types for built-in function `sinl'
repeated for `cosl', `fabsl', and `sqrtl', triggered by line 442.

inconsistent operand constraints in an  `asm',
triggered by lines 1100, 1124, 1150, 1755, 1785, and 1834.

I cannot see on those source lines what causes such a
message; I suspect there is some long complicated
cpp macro or asm statement in some include file which
I don't find.

Has anyone tried building numpy on Yellow Dog Linux or on a PowerPC with gcc?

Vincent Broman
[EMAIL PROTECTED]
___
Numpy-discussion mailing list
Numpy-discussion@scipy.org
http://projects.scipy.org/mailman/listinfo/numpy-discussion


Re: [Numpy-discussion] Accessing a numpy array in a mmap fashion

2007-08-30 Thread Ryan May
Brian Donovan wrote:
 Hello all,
 
   I'm wondering if there is a way to use a numpy array that uses disk as
 a memory store rather than ram. I'm looking for something like mmap but
 which can be used like a numpy array. The general idea is this. I'm
 simulating a system which produces a large dataset over a few hours of
 processing time. Rather than store the numpy array in memory during
 processing I'd like to write the data directly to disk but still be able
 to treat the array as a numpy array. Is this possible? Any ideas?

What you're looking for is numpy.memmap, though the documentation is
eluding me at the moment.

Ryan

-- 
Ryan May
Graduate Research Assistant
School of Meteorology
University of Oklahoma
___
Numpy-discussion mailing list
Numpy-discussion@scipy.org
http://projects.scipy.org/mailman/listinfo/numpy-discussion


Re: [Numpy-discussion] Accessing a numpy array in a mmap fashion

2007-08-30 Thread Anne Archibald
On 30/08/2007, Brian Donovan [EMAIL PROTECTED] wrote:
 Hello all,

   I'm wondering if there is a way to use a numpy array that uses disk as a
 memory store rather than ram. I'm looking for something like mmap but which
 can be used like a numpy array. The general idea is this. I'm simulating a
 system which produces a large dataset over a few hours of processing time.
 Rather than store the numpy array in memory during processing I'd like to
 write the data directly to disk but still be able to treat the array as a
 numpy array. Is this possible? Any ideas?

You want numpy.memmap:
http://mail.python.org/pipermail/python-list/2007-May/443036.html

This will do exactly what you want (though you may have problems with
arrays bigger than a few gigabytes, particularly on 32-bit systems)
and there may be a few rough edges. You will probably need to create
the file first.

Keep in mind that if the array is actually temporary, the virtual
memory system will push unused parts out to disk as memory fills up,
so there's no need to use memmap explicitly. If you want the array
permanently on disk, though, memmap is probably the most convenient
way to do it - though if your access patterns are not local it may
involve a lot of thrashing. Sequential disk writes have the advantage
(?) of forcing you to write code that accesses disks in a local
fashion.

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


Re: [Numpy-discussion] Error code of NumpyTest()

2007-08-30 Thread Stefan van der Walt
On Thu, Aug 30, 2007 at 12:48:44PM +0300, Pearu Peterson wrote:
 The svn version of test() function now returns TestResult object.
 
 So, test() calls in buildbot should read:
 
   import numpy,sys; sys.exit(not
 numpy.test(verbosity=,level=).wasSuccessful())
 
 Hopefully buildbot admins can update the test commands accordingly.

Thanks, Pearu.  I forwarded your instructions to the relevant parties.

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