[Numpy-discussion] [OT] Why Python 'fits your brain'

2006-11-09 Thread Fernando Perez
Please forgive the not-specifically-numpy post. I'll keep it short. Some of us often, when trying to explain to newcomers the benefits of Python for scientific work, use expressions like the famous 'it fits your brain'. This is an attempt at conveying why it seems like such a natural tool for exp

Re: [Numpy-discussion] Int32s, scalar operations and Pyhon longs

2006-11-09 Thread Fernando Perez
On 11/9/06, Tim Hochberg <[EMAIL PROTECTED]> wrote: > Let me add that I can't imagine that the bugs will be all that subtle > given that numpy now spits out a warning on overflow. > If you're really worried about this I suggest you crank up the error > mode to make this an error - then you really

Re: [Numpy-discussion] Int32s, scalar operations and Pyhon longs

2006-11-09 Thread Fernando Perez
On 11/9/06, Robert Kern <[EMAIL PROTECTED]> wrote: > Fernando Perez wrote: > > I understand why this happens, but I wonder if it should be in any way > > 'fixed' (if that is even feasible without introducing other problems): [...] > > I am sure it will be

[Numpy-discussion] Int32s, scalar operations and Pyhon longs

2006-11-09 Thread Fernando Perez
I understand why this happens, but I wonder if it should be in any way 'fixed' (if that is even feasible without introducing other problems): In [28]: x = 99 In [29]: y = numpy.array([x]) In [30]: z = y[0] In [31]: x==z Out[31]: True In [32]: x Out[32]: 99 In [33]: z Out[33]: 99

Re: [Numpy-discussion] Profiling Python codes with hotshot and KCachegrind

2006-11-08 Thread Fernando Perez
On 11/8/06, Stefan van der Walt <[EMAIL PROTECTED]> wrote: > This looks very interesting. It works for me on simple scripts, but > whenever I include the lines > > from numpy.testing import set_local_path > set_local_path('../../..') > > in the input, pycachegrind aborts with > > File > "/home

[Numpy-discussion] Profiling Python codes with hotshot and KCachegrind

2006-11-08 Thread Fernando Perez
Hi all, in the past, Arnd Baecker has made a number of very useful posts on this matter, and provided some nice utilities to do it. I now needed to profile some fairly complex codes prior to a big optimization push, so I went over his material and wrote a little tool to make the whole process as

Re: [Numpy-discussion] Strange and hard to reproduce crash

2006-11-06 Thread Fernando Perez
On 10/23/06, Travis Oliphant <[EMAIL PROTECTED]> wrote: > I've placed them in SVN (r3384): > > arraydescr_dealloc needs to do something like. > > if (self->fields == Py_None) { > print something > incref(self) > return; > } Travis, I know you're busy right now, so this message is just

Re: [Numpy-discussion] numpy book

2006-11-02 Thread Fernando Perez
On 11/2/06, Travis Oliphant <[EMAIL PROTECTED]> wrote: > Thanks for the pre-amble. Does it require pdflatex? I use ps2pdf > because to generate the shaded boxes and graphics. I could probably try > to do it with pdflatex and png files but I haven't tried, yet. I just tested it with ps2pdf on a

Re: [Numpy-discussion] numpy book

2006-11-02 Thread Fernando Perez
On 11/2/06, Travis Oliphant <[EMAIL PROTECTED]> wrote: > > >Note that this is not a request to Travis to send me the latest version > >by private email. That would be inefficient and my need is not that > >urgent. Nevertheless I think that issue should be settled. > > > > > There will be an update,

Re: [Numpy-discussion] [SciPy-user] [ANN[ pysamplerate, a library to do high quality samplerate convertion

2006-11-01 Thread Fernando Perez
On 11/2/06, David Cournapeau <[EMAIL PROTECTED]> wrote: > (if those announcements are not welcome on the lists, please tell me) Frankly, if an announcement for a free Python signal processing library is not welcome on the scipy lists, I don't know where it would be ;) As a minor note though: plea

Re: [Numpy-discussion] numpy.random.ranomd_integers returning only negative numbers ?

2006-11-01 Thread Fernando Perez
On 11/1/06, David Cournapeau <[EMAIL PROTECTED]> wrote: > Hi, > > I want to generate some random integers,let's say in the range [- > 2^15, 2^16]. Why doing: > > noise = numpy.random.random_integers(- (2 ** 15), (2 * 15), 22050) > > gives only negative numbers ? In [3]: noise = numpy.r

Re: [Numpy-discussion] dgesdd error

2006-11-01 Thread Fernando Perez
On 11/1/06, Travis Oliphant <[EMAIL PROTECTED]> wrote: > > Apparently some dgesdd libraries don't actually compute the correct > value for the work-space size if requested. > > This results in an ** ILLEGAL value and program termination from LAPACK. > > I've added code in the latest SVN to that par

Re: [Numpy-discussion] installing numpy on Tiger

2006-10-31 Thread Fernando Perez
On 10/31/06, Alan Isaac <[EMAIL PROTECTED]> wrote: > If other users will not profit from this question, > please consider it OT and ignore it. But perhaps > it will prove useful to some potential numpy users. > > I am a long time Windows user who has been happily > using the Python and numpy insta

Re: [Numpy-discussion] [SciPy-user] Need more comments from scientific community on python-dev

2006-10-31 Thread Fernando Perez
On 10/31/06, Travis Oliphant <[EMAIL PROTECTED]> wrote: > Fernando Perez wrote: > >I actually worry about the same: I really would like to help, but > >after reading the whole discussion, I realized that the low-level > >details being asked and discussed are so

Re: [Numpy-discussion] Strange and hard to reproduce crash

2006-10-30 Thread Fernando Perez
On 10/30/06, Lisandro Dalcin <[EMAIL PROTECTED]> wrote: > FYI, this is what is defined in Include/object.h > > /* PyObject_HEAD defines the initial segment of every PyObject. */ > #define PyObject_HEAD \ > _PyObject_HEAD_EXTRA\ > Py_ssize_t ob_refcnt;

Re: [Numpy-discussion] glibc invalid pointer error

2006-10-30 Thread Fernando Perez
On 10/30/06, Travis Oliphant <[EMAIL PROTECTED]> wrote: > David Huard wrote: > > > Ok, > > I'll update numpy and give it another try tonight. > > > > I just fixed some reference-count problems in f2py today. These were of > the variety that there was a missing decref that would cause the > referen

Re: [Numpy-discussion] glibc invalid pointer error

2006-10-30 Thread Fernando Perez
On 10/30/06, Travis Oliphant <[EMAIL PROTECTED]> wrote: > Fernando Perez wrote: > > >On 10/30/06, David Huard <[EMAIL PROTECTED]> wrote: > > > > > >>Hi, > >>I have a script that crashes, but only if it runs over 9~10 hours, with the >

Re: [Numpy-discussion] glibc invalid pointer error

2006-10-30 Thread Fernando Perez
On 10/30/06, Travis Oliphant <[EMAIL PROTECTED]> wrote: > Fernando Perez wrote: > >This sounds awfully reminiscent of the bug I recently mentioned: > > > >http://aspn.activestate.com/ASPN/Mail/Message/numpy-discussion/3312099 > > > > > > It actually

Re: [Numpy-discussion] Strange and hard to reproduce crash

2006-10-30 Thread Fernando Perez
On 10/30/06, Charles R Harris <[EMAIL PROTECTED]> wrote: > I suspect the real problem is that the refcount keeps going up. Even if it > was unsigned it would eventually wrap to zero and with a bit of luck get > garbage collected. So probably something isn't decrementing the refcount. Oops, my ba

Re: [Numpy-discussion] Strange and hard to reproduce crash

2006-10-30 Thread Fernando Perez
On 10/23/06, Travis Oliphant <[EMAIL PROTECTED]> wrote: I've placed them in SVN (r3384): arraydescr_dealloc needs to do something like. if (self->fields == Py_None) { print something incref(self) return; } Here is some more info. We left a long-running job over the weekend with

Re: [Numpy-discussion] glibc invalid pointer error

2006-10-30 Thread Fernando Perez
On 10/30/06, David Huard <[EMAIL PROTECTED]> wrote: > Hi, > I have a script that crashes, but only if it runs over 9~10 hours, with the > following backtrace from gdb. The script uses PyMC, and repeatedly calls (> > 100) likelihood functions written in fortran and wrapped with f2py. > Numpy: 1.

Re: [Numpy-discussion] pyaudio, a module to make noise from numpy arrays

2006-10-27 Thread Fernando Perez
On 10/27/06, David L. Goldsmith <[EMAIL PROTECTED]> wrote: > I'm sure some others _might_ regard this as frivolous, so let me just > say: "Way Cool"! Thanks! +1, and not frivolous at all. It's /really/ neat to be able to pull in data from standard image formats (say jpeg) into arrays to quickly

Re: [Numpy-discussion] Strange and hard to reproduce crash

2006-10-23 Thread Fernando Perez
On 10/23/06, Travis Oliphant <[EMAIL PROTECTED]> wrote: > Fernando Perez wrote: > > If you point me to the right place in the sources, I'll be happy to > > add something to my local copy, rebuild numpy and rerun with these > > print statements in place. > &

Re: [Numpy-discussion] Strange and hard to reproduce crash

2006-10-23 Thread Fernando Perez
On 10/23/06, Travis Oliphant <[EMAIL PROTECTED]> wrote: > Fernando Perez wrote: > > Hi all, > > > > two colleagues have been seeing occasional crashes from very > > long-running code which uses numpy. We've now gotten a backtrace from > > one such cra

Re: [Numpy-discussion] Strange and hard to reproduce crash

2006-10-23 Thread Fernando Perez
On 10/23/06, Albert Strasheim <[EMAIL PROTECTED]> wrote: > Hey Fernando > > Maybe you can give the code a spin under Valgrind. It's going to be slow, > but if the crash is being caused by memory corruption that happens all the > time as the process is running, maybe Valgrind will show it. > > You n

[Numpy-discussion] Strange and hard to reproduce crash

2006-10-23 Thread Fernando Perez
Hi all, two colleagues have been seeing occasional crashes from very long-running code which uses numpy. We've now gotten a backtrace from one such crash, unfortunately it uses a build from a few days ago: In [3]: numpy.__version__ Out[3]: '1.0b5.dev3097' In [4]: scipy.__version__ Out[4]: '0.5.

Re: [Numpy-discussion] Should numpy.sqrt(-1) return 1j rather than nan?

2006-10-12 Thread Fernando Perez
On 10/12/06, Travis Oliphant <[EMAIL PROTECTED]> wrote: > > > I'd like to pitch in (again) on this issue, but I'll try to make sure > > that it's clear that I'm NOT arguing about sqrt() in particular, one > > > > way or another. > > > > Fernando, > > I don't disagree with you in principle. I don't

Re: [Numpy-discussion] Should numpy.sqrt(-1) return 1j rather than nan?

2006-10-11 Thread Fernando Perez
On 10/12/06, Travis Oliphant <[EMAIL PROTECTED]> wrote: > Why in the world does it scare you away. This makes no sense to me. > If you don't like the scipy version don't use it. NumPy and SciPy are > not the same thing. I'd like to pitch in (again) on this issue, but I'll try to make sure that

Re: [Numpy-discussion] Should numpy.sqrt(-1) return 1j rather than nan?

2006-10-11 Thread Fernando Perez
On 10/11/06, Travis Oliphant <[EMAIL PROTECTED]> wrote: > Fernando Perez wrote: > >There are people who import scipy for everything, others distinguish > >between numpy and scipy, others use numpy alone and at some point in > >their life's code they do > > &

Re: [Numpy-discussion] Should numpy.sqrt(-1) return 1j rather than nan?

2006-10-11 Thread Fernando Perez
On 10/11/06, Travis Oliphant <[EMAIL PROTECTED]> wrote: > Fernando Perez wrote: > >IMHO, scipy should be within reason a strict superset of numpy. > > > > > This was not the relationship of scipy to Numeric. > > For me, it's the fact that scipy *used* to

Re: [Numpy-discussion] Should numpy.sqrt(-1) return 1j rather than nan?

2006-10-11 Thread Fernando Perez
On 10/11/06, Travis Oliphant <[EMAIL PROTECTED]> wrote: > [EMAIL PROTECTED] wrote: > >Could sqrt(-1) made to return 1j again? > > > Not in NumPy. But, in scipy it could. Without taking sides on which way to go, I'd like to -1 the idea of a difference in behavior between numpy and scipy. IMHO, s

[Numpy-discussion] A mean docstring?

2006-10-10 Thread Fernando Perez
Hi all, I was updating some old Numeric code to be more 'numpythonic' (it works, but uses a lot of Numeric-style cruft), and read the a.mean() docstring that says: If axis is None, this equals: a.sum(axis, dtype) * 1.0 / product(a.shape,axis=0) Is this convoluted form of the denomina

Re: [Numpy-discussion] contribution about history of Numeric

2006-10-05 Thread Fernando Perez
On 10/5/06, Paul Dubois <[EMAIL PROTECTED]> wrote: > I was reading the 'History of SciPy' page and noticed the discussion about > Numeric. Here's the true story about why the various names for the original: > numpy, Numeric, Numerical. I added this to the wiki page (http://www.scipy.org/History_of

[Numpy-discussion] [OT] Interesting interview with Pearu (f2py and others...)

2006-10-05 Thread Fernando Perez
Hi all, since this is not about me, I think it's fair to plug an interview :) http://www.pythonthreads.com/articles/interviews/once-i-learned-about-python,-i-stopped-trying-out-different-languages.html contains a very nice interview with Pearu, where in fact I learned a number of interesting thi

Re: [Numpy-discussion] reload and f2py

2006-09-26 Thread Fernando Perez
On 9/26/06, George Nurser <[EMAIL PROTECTED]> wrote: > I'm running Python 2.3.5 with recent SVN f2py. > > Suppose I import an extension I have built with f2py. Then, if I edit > the fortran and recompile the extension, I cannot use reload to use > the modified version within the same Python session

Re: [Numpy-discussion] 1.0b5 build failure

2006-09-09 Thread Fernando Perez
On 9/9/06, Neal Becker <[EMAIL PROTECTED]> wrote: > Sorry, actually that's today's numpy svn - not 1.0b5. Make sure you have a clean build environment, the current SVN builds just fine on my Dapper 6.06 box; I just rebuilt it a second ago. Cheers, f ps. Here's my little build script, which I us

Re: [Numpy-discussion] Problem with concatenate and object arrays

2006-09-04 Thread Fernando Perez
On 9/3/06, Robert Kern <[EMAIL PROTECTED]> wrote: > > I think it's propably a bug: > > > > >>> concatenate((array([]),b)) > > array([None, None], dtype=object) > > Well, if you can fix it without breaking anything else, then it's a bug. > > However, I would suggest that a rule of thumb for using

[Numpy-discussion] Problem with concatenate and object arrays

2006-09-03 Thread Fernando Perez
Hi all, I'm wondering if the following difference in behavior of object arrays should be considered a bug. Let a and b be: In [21]: a = [0,1] In [22]: b = [ None, None] If we concatenate a with an empty list, it works: In [23]: numpy.concatenate(([],a)) Out[23]: array([0, 1]) But not so for

Re: [Numpy-discussion] possible bug with numpy.object_

2006-08-31 Thread Fernando Perez
On 8/31/06, Travis Oliphant <[EMAIL PROTECTED]> wrote: > What about > > N.array(3).size > > N.array([3]).size > > N.array([3,3]).size > > Essentially, the [] is being treated as an object when you explicitly > ask for an object array in exactly the same way as 3 is being treated as > a number in t

Re: [Numpy-discussion] Changing Fatal error into ImportError?

2006-08-30 Thread Fernando Perez
On 8/30/06, Robert Kern <[EMAIL PROTECTED]> wrote: > I don't see where we're calling Py_FatalError. The problem might be in Python > or > mwadap. Indeed, import_array() raises a PyExc_ImportError. Sorry for the noise: it looks like this was already fixed: http://projects.scipy.org/scipy/numpy/c

[Numpy-discussion] Changing Fatal error into ImportError?

2006-08-30 Thread Fernando Perez
Hi all, this was mentioned in the past, but I think it fell through the cracks: Python 2.3.4 (#1, Mar 10 2006, 06:12:09) [GCC 3.4.5 20051201 (Red Hat 3.4.5-2)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import mwadap Overwriting info= from scipy.misc (wa

Re: [Numpy-discussion] possible bug with numpy.object_

2006-08-30 Thread Fernando Perez
On 8/30/06, Stefan van der Walt <[EMAIL PROTECTED]> wrote: > The current behaviour makes sense, but is maybe not consistent: > > N.array([],dtype=object).size == 1 > N.array([[],[]],dtype=object).size == 2 Yes, including one more term in this check: In [5]: N.array([],dtype=object).size Out[5]:

Re: [Numpy-discussion] Release of 1.0b5 this weekend

2006-08-29 Thread Fernando Perez
On 8/29/06, Travis Oliphant <[EMAIL PROTECTED]> wrote: > > Hi all, > > Classes start for me next Tuesday, and I'm teaching a class for which I > will be using NumPy / SciPy extensively. I need to have a release of > these two (and hopefully matplotlib) that work with each other. > > Therefore, I'm

Re: [Numpy-discussion] Release of 1.0b5 this weekend

2006-08-29 Thread Fernando Perez
On 8/29/06, David M. Cooke <[EMAIL PROTECTED]> wrote: > On Tue, 29 Aug 2006 14:03:39 -0700 > Tim Hochberg <[EMAIL PROTECTED]> wrote: > > b = a.sort() # Returns a copy > > a.sort(out=a) # Sorts a in place > > a.sort(out=c) # Sorts a into c (probably just equivalent to c = a.sort() > > in this cas

Re: [Numpy-discussion] Release of 1.0b5 this weekend

2006-08-29 Thread Fernando Perez
On 8/29/06, Charles R Harris <[EMAIL PROTECTED]> wrote: > Speaking of features, I wonder if more of the methods should return > references. For instance, it might be nice to write something like: > > a.sort().searchsorted([...]) > > instead of making two statements out of it. +1 for more 'return

Re: [Numpy-discussion] request for new array method: arr.abs()

2006-08-23 Thread Fernando Perez
On 8/23/06, Bill Baxter <[EMAIL PROTECTED]> wrote: > The thing that I find I keep forgetting is that abs() is a built-in, but > other simple functions are not. So it's abs(foo), but numpy.floor(foo) and > numpy.ceil(foo). And then there's round() which is a built-in but can't be > used with array

Re: [Numpy-discussion] Interesting memory leak

2006-08-18 Thread Fernando Perez
> This leak is caused by add_docstring, but it's supposed to leak. I wonder if > there's a way to register some kind of on-exit handler in Python so that > this can also be cleaned up? import atexit atexit.register(your_cleanup_function) whose api is no args on input: def your_cleanup_function()

Re: [Numpy-discussion] [Fwd: Re: Signal handling]

2006-08-18 Thread Fernando Perez
On 8/18/06, Fernando Perez <[EMAIL PROTECTED]> wrote: > here is the SAGE signal handling code, graciously donated by William Stein. Hit send too soon... I forgot to thank William for this code :) hopefully one of many things we'll be sharing between numpy/scipy and SAG

[Numpy-discussion] [Fwd: Re: Signal handling]

2006-08-18 Thread Fernando Perez
also becomes trivial for end-users to user the same macros in their own code without doing anything additional. Regards, f Original Message Subject: Re: Signal handling Date: Fri, 18 Aug 2006 21:15:38 + From: William Stein <[EMAIL PROTECTED]> To: Fernando Pe

Re: [Numpy-discussion] Creating and reshaping fortran order arrays

2006-08-14 Thread Fernando Perez
On 8/14/06, Travis Oliphant <[EMAIL PROTECTED]> wrote: > Travis Oliphant wrote: > > However, you can use the ndarray creation function itself to do what you > > want: > > > > a = ndarray(shape=(2,2), dtype=int32, buffer=str, order='F') > > > > This will use the memory of the string as the new array

Re: [Numpy-discussion] Version numbers again

2006-07-27 Thread Fernando Perez
On 7/27/06, Francesc Altet <[EMAIL PROTECTED]> wrote: > Travis, > Speaking on what we regularly do, I would choose a 1.0b2. for the > trunk version. This is a way to say people: "Hey, you are using a version > that will be the 1.0b2 in the future.". Of course, the same meaning can be > achieved i

Re: [Numpy-discussion] Please comment on SVN versioning convention

2006-07-24 Thread Fernando Perez
On 7/24/06, Travis Oliphant <[EMAIL PROTECTED]> wrote: > Andrew Straw has emphasized that the current strategy of appending the > SVN version number to development versions of the SVN tree makes it hard > to do version sorting. > > His proposal is to not change the version number until the first be

Re: [Numpy-discussion] fast way of doing "cross-multiplications" ?

2006-07-18 Thread Fernando Perez
On 7/18/06, Tim Hochberg <[EMAIL PROTECTED]> wrote: > Eric Emsellem wrote: > > thanks for the tips. (indeed your "add.reduce" is correct: I just wrote > > this down too quickly, in the script I have a "sum" included). > > > > And yes you are right for the memory issue, so I may just keep the loop >

Re: [Numpy-discussion] 64-bit build woes

2006-07-17 Thread Fernando Perez
On 7/17/06, Travis Oliphant <[EMAIL PROTECTED]> wrote: > Fernando Perez wrote: > > Hi all, > > > > I received this message today from a collaborator. I don't have > > direct access to this box, but he posted fairly detailed logs. Has > > anyone see

[Numpy-discussion] 64-bit build woes

2006-07-17 Thread Fernando Perez
Hi all, I received this message today from a collaborator. I don't have direct access to this box, but he posted fairly detailed logs. Has anyone seen a similar issue with current code? If not, I'll try to track down further with him what the problem may actually be. Thanks for any help, f

Re: [Numpy-discussion] Scalars, comparisons and indexing. Is this a bug?

2006-07-14 Thread Fernando Perez
On 7/14/06, Bill Baxter <[EMAIL PROTECTED]> wrote: > I believe that's the problem that the indexing PEP from Travis is > supposed to address: > http://www.python.org/dev/peps/pep-0357/ > So I think there's not much anyone can do about it untill the PEP is > accepted and implemented. > > Maybe you

[Numpy-discussion] Scalars, comparisons and indexing. Is this a bug?

2006-07-14 Thread Fernando Perez
Hi all, I just got bit by this problem, and I'm not really sure if this is something that should be considered a numpy bug or not. It is a bit unpleasant, at the least, though it can be easily worked around. Here's a simple demonstration: In [32]: a=array([1,2]) In [33]: b=1 In [34]: (1,2)[a[0

Re: [Numpy-discussion] bdist_rpm failure

2006-07-11 Thread Fernando Perez
On 7/11/06, Travis Oliphant <[EMAIL PROTECTED]> wrote: > Make sure you get rid of the MANIFEST file in the source directory > before trying to run sdist or bdist_rpm. The MANIFEST file is not being > deleted when it is dated... Since both numpy/scipy have a MANIFEST.in, this bit of code (from ipyt

Re: [Numpy-discussion] [matplotlib-devel] Quicker image transfer, tobuffer?

2006-07-11 Thread Fernando Perez
On 7/11/06, John Hunter <[EMAIL PROTECTED]> wrote: > > "Eric" == Eric Firing <[EMAIL PROTECTED]> writes: > > Eric> Correction: I did fix the first problem, and the second > Eric> problem is not at all what I thought. Instead, the > Eric> examples/data/lena.jpg file in my svn mpl di

Re: [Numpy-discussion] .M .A .T .H attribute result

2006-07-08 Thread Fernando Perez
Hi all, On 7/7/06, Travis Oliphant <[EMAIL PROTECTED]> wrote: > > I didn't compile the results, but the discussion on the idea of adding > new attributes to the array object led to the following result. > > Added: .T attribute to mean self.transpose() [...] > .H > > A few were in favor, but thi

Re: [Numpy-discussion] I think something broke badly today in numpy/scipy...

2006-07-08 Thread Fernando Perez
On 7/8/06, Travis Oliphant <[EMAIL PROTECTED]> wrote: > Hey Fernando. I think I found the problem. It was the same problem > causing the BFGS test to fail in SciPy. [...] > The problem should be fixed in SVN. Confirmed. With: numpy version: 0.9.9.2788 scipy version: 0.5.0.2057 I checked

[Numpy-discussion] I think something broke badly today in numpy/scipy...

2006-07-07 Thread Fernando Perez
Hi all, I updated earlier today (about 4 hours ago) numpy/scipy SVN, and all of a sudden my codes broke left and right. Backing off to In [3]: numpy.__version__ Out[3]: '0.9.9.2737' In [4]: scipy.__version__ Out[4]: '0.5.0.2044' things are OK again. I am really sorry not to be able to provide

Re: [Numpy-discussion] NumPy C-API now has prefixes

2006-07-07 Thread Fernando Perez
On 7/7/06, Travis Oliphant <[EMAIL PROTECTED]> wrote: > I just committed a big change to the NumPy SVN (r2773-r2777) which adds > the prefix npy_ or NPY_ to all names not otherwise pre-fixed. > > There is also a noprefix.h header that allows you to use the names > without the prefixes defined, as

Re: [Numpy-discussion] [SciPy-dev] Weave, numpy, external libraries and conflicting typedefs

2006-07-07 Thread Fernando Perez
On 7/7/06, Travis Oliphant <[EMAIL PROTECTED]> wrote: > I'm not opposed to putting a *short* prefix in front of everything (the > Int32, Float64, stuff came from numarray which now has it's own > back-ward compatible header where it could be placed now anyway). > Perhaps npy_ would be a suitable

[Numpy-discussion] A C++ library and the new array interface: the best approach?

2006-07-03 Thread Fernando Perez
Hi all, I'd like to ask for a bit of guidance on the best path to follow regarding the integration of an existing C++ library with numpy, given the recent developments on these topics: 1. the new array interface specification 2. the ctypes discussions 3. pyrex Our situation is the following: a

Re: [Numpy-discussion] Time for beta1 of NumPy 1.0

2006-06-30 Thread Fernando Perez
On 6/30/06, Sasha <[EMAIL PROTECTED]> wrote: > On 6/30/06, Fernando Perez <[EMAIL PROTECTED]> wrote: > > ... > > Besides, decent unit tests will catch these problems. We all know > > that every scientific code in existence is unit tested to the smallest > >

Re: [Numpy-discussion] Time for beta1 of NumPy 1.0

2006-06-30 Thread Fernando Perez
On 6/30/06, Scott Ransom <[EMAIL PROTECTED]> wrote: > +1 for float64 for me as well. +1 for float64 I have lots of code overriding the int defaults by hand which were giving me grief with hand-written extensions (which were written double-only for speed reasons). I'll be happy to clean this up.

Re: [Numpy-discussion] Setuptools leftover junk

2006-06-28 Thread Fernando Perez
On 6/28/06, David M. Cooke <[EMAIL PROTECTED]> wrote: > On Wed, 28 Jun 2006 13:18:35 -0600 > "Fernando Perez" <[EMAIL PROTECTED]> wrote: > > > On 6/28/06, David M. Cooke <[EMAIL PROTECTED]> wrote: > > > > > Done. I've also added a &

Re: [Numpy-discussion] Setuptools leftover junk

2006-06-28 Thread Fernando Perez
On 6/28/06, David M. Cooke <[EMAIL PROTECTED]> wrote: > Done. I've also added a 'setupegg.py' module that wraps running 'setup.py' > with an import of setuptools (it's based on the one used in matplotlib). > > easy_install still works, also. You beat me to it :) However, your patch has slightly

Re: [Numpy-discussion] Setuptools leftover junk

2006-06-28 Thread Fernando Perez
On 6/28/06, Robert Kern <[EMAIL PROTECTED]> wrote: > numpy.distutils uses setuptools if it is importable in order to make sure that > the two don't stomp on each other. It's probable that that test could probably > be done with Andrew Straw's method: > >if 'setuptools' in sys.modules: > h

Re: [Numpy-discussion] fread codes versus numpy types

2006-06-28 Thread Fernando Perez
On 6/28/06, David M. Cooke <[EMAIL PROTECTED]> wrote: > On Wed, 28 Jun 2006 11:22:38 -0600 > "Fernando Perez" <[EMAIL PROTECTED]> wrote: > > Should I apply this patch, so we push the cleaned-up API even a bit harder? > > Yes please. I think all the mod

[Numpy-discussion] Setuptools leftover junk

2006-06-28 Thread Fernando Perez
Hi all, I recently noticed one of my in-house projects started leaving aroun .egg-info directories after I ran its setup.py, even though I don't use setuptools for anything at all. For now I just added an extra clean rule to my makefile and forgot about it, but it kind of annoyed me. Today I loo

Re: [Numpy-discussion] fread codes versus numpy types

2006-06-28 Thread Fernando Perez
On 6/28/06, Robert Kern <[EMAIL PROTECTED]> wrote: > The Capitalized versions are actually old typecodes for backwards > compatibility > with Numeric. In recent development versions of numpy, they are no longer > exposed except through the numpy.oldnumeric compatibility module. A decision > was

Re: [Numpy-discussion] Any Numeric or numarray users on this list?

2006-06-25 Thread Fernando Perez
On 5/30/06, Travis Oliphant <[EMAIL PROTECTED]> wrote: > 4) Please provide any suggestions for improving NumPy. Well, if I can beg for one thing, it would be fixing dot(): http://projects.scipy.org/scipy/numpy/ticket/156 This bug is currently stalling us pretty badly, since dot() is at the core

Re: [Numpy-discussion] Any Numeric or numarray users on this list?

2006-06-25 Thread Fernando Perez
On 5/30/06, Travis Oliphant <[EMAIL PROTECTED]> wrote: > > Please help the developers by responding to a few questions. Sorry for not replying before, I wanted a more complete picture before answering. > 1) Have you transitioned or started to transition to NumPy (i.e. import > numpy)? The day th

Re: [Numpy-discussion] Recarray attributes writeable

2006-06-17 Thread Fernando Perez
On 6/17/06, Francesc Altet <[EMAIL PROTECTED]> wrote: > However, I think that this has its utility, specially when accessing to > nested fields (see later). In addition, I'd suggest introducing a > special accessor called, say, 'fields' in order to access the fields > themselves and not the attrib

Re: [Numpy-discussion] Array interface updated to Version 3

2006-06-16 Thread Fernando Perez
On 6/16/06, Travis Oliphant <[EMAIL PROTECTED]> wrote: > There is talk of ctypes supporting the new interface which is a worthy > development. Please encourage that if you can. That would certainly be excellent, esp. given how ctypes is slated to be officially part of python 2.5. I think it wou

Re: [Numpy-discussion] problem with numpy.. sometimes using numarray? and selection question

2006-06-15 Thread Fernando Perez
On 6/15/06, Eric Emsellem <[EMAIL PROTECTED]> wrote: > Hi, > > I have written a number of small modules where I now systematically use > numpy. > > I have in principle used the latest versions of the different > array/Science modules (scipy, numpy, ..) but still at some point during > a selection,

Re: [Numpy-discussion] numpy segv on OpenBSD

2006-06-15 Thread Fernando Perez
On 6/15/06, Damien Miller <[EMAIL PROTECTED]> wrote: > David M. Cooke wrote: > > Can you update to the latest svn? We may have fixed it already: valgrind is > > showing up nothing for me. > > Ok, but dumb question: how do I check out the SVN trunk? Sourceforge > lists details for CVS only... (unles

Re: [Numpy-discussion] Getting rid of annoying weave nag

2006-06-09 Thread Fernando Perez
On 6/9/06, David M. Cooke <[EMAIL PROTECTED]> wrote: > > This difference is so dramatic that I think a message is justified > > (absent a proper logging framework). It's helpful to know that the > > time is going into c++ compilation, and not your code hanging for 30 > > seconds. > > Ok, I'll giv

Re: [Numpy-discussion] Getting rid of annoying weave nag

2006-06-09 Thread Fernando Perez
On 6/9/06, David M. Cooke <[EMAIL PROTECTED]> wrote: > On Thu, Jun 08, 2006 at 11:28:04PM -0600, Fernando Perez wrote: > > Anyone object to this patch against current numpy SVN to get rid of > > this thing? (tracking where the hell that thing was coming from was > > all

[Numpy-discussion] Getting rid of annoying weave nag

2006-06-09 Thread Fernando Perez
Hi all, the following warning about strict-prototypes in weave drives me crazy: longs[~]> python wbuild.py cc1plus: warning: command line option "-Wstrict-prototypes" is valid for Ada/C/ObjC but not for C++ since I use weave on auto-generated code, I get it lots of times and I find spurious war

Re: [Numpy-discussion] Build questions, atlas, lapack...

2006-06-08 Thread Fernando Perez
On 6/8/06, Simon Burton <[EMAIL PROTECTED]> wrote: > On Thu, 8 Jun 2006 16:48:27 -0600 > "Fernando Perez" <[EMAIL PROTECTED]> wrote: > > > > > In summary, I don't really know if this is actually finding what it > > wants or not, given the two

Re: [Numpy-discussion] Build questions, atlas, lapack...

2006-06-08 Thread Fernando Perez
On 6/8/06, Dan Christensen <[EMAIL PROTECTED]> wrote: > I don't know if it's related, but I've found on my Debian system that > whenever I want to compile something that uses the atlas library, I > need to put -L/usr/lib/sse2 on the gcc line, even though everything > seems to indicate that the link

Re: [Numpy-discussion] Build questions, atlas, lapack...

2006-06-08 Thread Fernando Perez
On 6/8/06, David M. Cooke <[EMAIL PROTECTED]> wrote: > Agree; I'll look at it. Many thanks. I'm sorry not to help, but I have a really big fish to fry right now, and can't commit to the diversion this would mean. Cheers, f ___ Numpy-discussion mail

[Numpy-discussion] Build questions, atlas, lapack...

2006-06-08 Thread Fernando Perez
Hi all, I'm starting the transition of a large code from Numeric to numpy, so I am now doing a fresh build with a lot more care than before, actually reading all the intermediate messages. I am a bit puzzled and could use some help. This is all on an ubuntu dapper box with the atlas-sse2 package

Re: [Numpy-discussion] crash in multiarray.pyd

2006-06-07 Thread Fernando Perez
On 6/7/06, Sven Schreiber <[EMAIL PROTECTED]> wrote: > The next matplotlib release compatible with numpy 0.9.8 is hopefully > coming soon! (but that's just a wish, not an informed opinion). Actually it was released yesterday, it's 0.87.3: http://sourceforge.net/project/showfiles.php?group_id=807

Re: [Numpy-discussion] Re: Any Numeric or numarray users on this list?

2006-05-31 Thread Fernando Perez
On 5/31/06, Alan G Isaac <[EMAIL PROTECTED]> wrote: On Wed, 31 May 2006, "Russell E. Owen" apparently wrote: > Please improve notification of documentation updates. > I keep seeing complaints from folks who've bought the > numpy documentation that they get no notification of > updates. That makes

Re: [Numpy-discussion] Suggestions for NumPy

2006-05-31 Thread Fernando Perez
On 5/31/06, Christopher Barker <[EMAIL PROTECTED]> wrote: Ed Schofield wrote: > Improvements for NumPy's web presence: > http://projects.scipy.org/scipy/numpy/ticket/132 From that page: NumPy's web presence could be improved by: 2. Pointing www.numpy.org to numeric.scipy.org instead of the S