Re: [Numpy-discussion] Hello and my first patch

2006-10-05 Thread John Hunter
> "Robert" == Robert Kern <[EMAIL PROTECTED]> writes: Robert> IMO, I'd rather see this and similar functions go into Robert> scipy. New functions that apply semantics to arrays (in Robert> this case, treating them as time series), I think should Robert> go into scipy. New funct

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

2006-10-31 Thread John Hunter
> "Travis" == Travis Oliphant <[EMAIL PROTECTED]> writes: Travis> All of these seem to define their own objects which are Travis> basically just interpretations of chunks of memory. At Travis> one time, we might have said "these should all be Travis> sub-classes of the ndarray"

[Numpy-discussion] ctypes warning

2006-11-06 Thread John Hunter
A simple import of numpy with the latest svn triggers a ctypes warning In [1]: import numpy /usr/lib/python2.4/site-packages/numpy/ctypeslib.py:12: UserWarning: All features of ctypes interface may not work with ctypes < 1.0.1 warnings.warn("All features of ctypes interface may not work with "

[Numpy-discussion] mysql -> record array

2006-11-14 Thread John Hunter
Has anyone written any code to facilitate dumping mysql query results (mainly arrays of floats) into numpy arrays directly at the extension code layer. The query results->list->array conversion can be slow. Ideally, one could do this semi-automagically with record arrays and table introspection.

Re: [Numpy-discussion] mysql -> record array

2006-11-14 Thread John Hunter
> "Erin" == Erin Sheldon <[EMAIL PROTECTED]> writes: Erin> The question I have been asking myself is "what is the Erin> advantage of such an approach?". It would be faster, but by In the use case that prompted this message, the pull from mysql took almost 3 seconds, and the conversio

Re: [Numpy-discussion] mysql -> record array

2006-11-14 Thread John Hunter
>>>>> "John" == John Hunter <[EMAIL PROTECTED]> writes: >>>>> "Erin" == Erin Sheldon <[EMAIL PROTECTED]> writes: Erin> The question I have been asking myself is "what is the Erin> advantage of such an approach?&qu

[Numpy-discussion] masked arrays

2006-05-31 Thread John Hunter
I'm a bit of an ma newbie. I have a 2D masked array R and want to extract the non-masked values in the last column. Below I use logical indexing, but I suspect there is a "built-in" way w/ masked arrays. I read through the docstring, but didn't see anything better. In [66]: c = R[:,-1] In [67

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

2006-07-11 Thread John Hunter
> "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 directory is Eric> corrupted. I have no idea why. Lookin

[Numpy-discussion] build bug

2006-08-12 Thread John Hunter
Just tried to build svn 2999 on OSX 10.3 w/ python2.3 and encountered a bug in numpy/core/setup.py on line 102 if sys.version[:3] < '2.4': #kws_args['headers'].append('stdlib.h') if check_func('strtod'): moredefs.append(('PyOS_ascii_

[Numpy-discussion] numarray cov function

2006-08-13 Thread John Hunter
I was surprised to see that numarray.mlab.cov is returning a rank-0 complex number when given two 1D arrays as inputs rather than the standard 2x2 covariance array I am used to seeing. Is this a feature or a bug? In [2]: import numarray.mlab as nam In [3]: x = nam.rand(10) In [4]: y = nam.r

Re: [Numpy-discussion] [matplotlib-devel] Fwd: Going to cut NumPy 1.0b5 tonight

2006-09-05 Thread John Hunter
> "Charlie" == Charlie Moad <[EMAIL PROTECTED]> writes: Charlie> I also get a compile error when trying to build against Charlie> the win32-py2.4 release. src\_na_nxutils.c(213) : error Charlie> C2275: 'PyObject' : illegal use of this type as an Charlie> expression c:\Python24