Re: [Numpy-discussion] convert csv file into recarray without pre-specifying dtypes and variable names

2007-07-07 Thread Vincent Nijs
Thanks for the reference John! csv2rec is about 30% faster than my code on the same data. If I read the code in csv2rec correctly it converts the data as it is being read using the csv modules. My setup reads in the whole dataset into an array of strings and then converts the columns as appropria

Re: [Numpy-discussion] Another change in default type of ones and zeros.

2007-07-07 Thread Charles R Harris
On 7/7/07, Charles R Harris <[EMAIL PROTECTED]> wrote: On 7/7/07, Charles R Harris <[EMAIL PROTECTED]> wrote: > > Hi All, > > Originally, ones and zeros defaulted to integer, later the default > changed to float, now it looks like it is integer again. > > In [80]: ones(2).dtype > Out[80]: dtyp

Re: [Numpy-discussion] Another change in default type of ones and zeros.

2007-07-07 Thread Charles R Harris
On 7/7/07, Charles R Harris <[EMAIL PROTECTED]> wrote: Hi All, Originally, ones and zeros defaulted to integer, later the default changed to float, now it looks like it is integer again. In [80]: ones(2).dtype Out[80]: dtype('int32') In [81]: zeros(2).dtype Out[81]: dtype('int32') In [82]: _

Re: [Numpy-discussion] fancy indexing/broadcasting question

2007-07-07 Thread Mark.Miller
That seems to do the trick. Runtimes are reduced by 15-20% in my code. Robert Kern wrote: > The reason is that tmp1 is no longer a mask into RNDarray, but into > RNDarray[tmp1] (the old tmp1). For something as small as (50, 50) and simple > criteria (no looping), the first version will probably

[Numpy-discussion] Another change in default type of ones and zeros.

2007-07-07 Thread Charles R Harris
Hi All, Originally, ones and zeros defaulted to integer, later the default changed to float, now it looks like it is integer again. In [80]: ones(2).dtype Out[80]: dtype('int32') In [81]: zeros(2).dtype Out[81]: dtype('int32') In [82]: __version__ Out[82]: '1.0.4.dev3880' This could break so

Re: [Numpy-discussion] fancy indexing/broadcasting question

2007-07-07 Thread Anne Archibald
On 07/07/07, Mark.Miller <[EMAIL PROTECTED]> wrote: > A quick question for the group. I'm working with some code to generate > some arrays of random numbers. The random numbers, however, need to > meet certain criteria. So for the moment, I have things that look like > this (code is just an abst

Re: [Numpy-discussion] fancy indexing/broadcasting question

2007-07-07 Thread Robert Kern
Mark.Miller wrote: > Sorry...here's a minor correction to the code. > > #1st part > import numpy > normal=numpy.random.normal > > RNDarray = normal(25,15,(50,50)) > tmp1 = (RNDarray < 0) | (RNDarray > 25) > while tmp1.any(): > print tmp1.size, tmp1.shape, tmp1[tmp1].size > RNDarray[tmp1

Re: [Numpy-discussion] Should bool_ subclass int?

2007-07-07 Thread Alan G Isaac
On Sat, 7 Jul 2007, Charles R Harris apparently wrote: > In [60]: a > Out[60]: array([ True, True, True, True], dtype=bool) > In [61]: a + a > Out[61]: array([ True, True, True, True], dtype=bool) Yea! Behaves like a boolean array. And for multiplication to. And in boolean matrices, pow

Re: [Numpy-discussion] problem compiling v.1.0.3 on a Mac

2007-07-07 Thread Robert Kern
John Cartwright wrote: > I tried to send that last night, but the message was so large that > it's waiting for approval. Here's the first part of the output: Do you have this directory: /Developer/SDKs/MacOSX10.4u.sdk If not, you might have to make sure you have the correct SDK installed. I

Re: [Numpy-discussion] fancy indexing/broadcasting question

2007-07-07 Thread Mark.Miller
Sorry...here's a minor correction to the code. #1st part import numpy normal=numpy.random.normal RNDarray = normal(25,15,(50,50)) tmp1 = (RNDarray < 0) | (RNDarray > 25) while tmp1.any(): print tmp1.size, tmp1.shape, tmp1[tmp1].size RNDarray[tmp1] = normal(25,15, size = RNDarray[tmp1].s

[Numpy-discussion] fancy indexing/broadcasting question

2007-07-07 Thread Mark.Miller
A quick question for the group. I'm working with some code to generate some arrays of random numbers. The random numbers, however, need to meet certain criteria. So for the moment, I have things that look like this (code is just an abstraction): import numpy normal=numpy.random.normal RNDar

Re: [Numpy-discussion] Should bool_ subclass int?

2007-07-07 Thread Charles R Harris
On 7/7/07, Timothy Hochberg <[EMAIL PROTECTED]> wrote: On 7/7/07, Travis Oliphant <[EMAIL PROTECTED]> wrote: > > > > > > > > On 7/6/07, *Travis Oliphant* <[EMAIL PROTECTED] > > > wrote: > > Here is a link to PEP 285 wher

Re: [Numpy-discussion] Problems with RandomArray

2007-07-07 Thread Charles R Harris
On 6/28/07, Alexander Dietz <[EMAIL PROTECTED]> wrote: Hi, I am not sure how to subscribe to this mailing list (there was no link for that, just this email adress), but hopefully someone will get this email and can me subscribe to this list, answer my question or ask someone else. Anyway, here

Re: [Numpy-discussion] Aligning an array on Windows

2007-07-07 Thread Timothy Hochberg
[Much time passes] I went ahead and added this warning. I kept thinking I should write a more detailed explanation about why this is a problem, but I never got around to it. At least this let's people know that there are some dragons to be wary of. -tim On 5/28/07, Francesc Altet <[EMAIL PROT

Re: [Numpy-discussion] Should bool_ subclass int?

2007-07-07 Thread Timothy Hochberg
On 7/7/07, Travis Oliphant <[EMAIL PROTECTED]> wrote: > > > On 7/6/07, *Travis Oliphant* <[EMAIL PROTECTED] > > wrote: > > Timothy Hochberg wrote: > > > > I'm working on getting some old code working with numpy and I > noticed > > that bool_ is not

Re: [Numpy-discussion] Should bool_ subclass int?

2007-07-07 Thread Travis Oliphant
> > > On 7/6/07, *Travis Oliphant* <[EMAIL PROTECTED] > > wrote: > > Timothy Hochberg wrote: > > > > I'm working on getting some old code working with numpy and I > noticed > > that bool_ is not a subclass of int. Given that python's bool > > subc

[Numpy-discussion] output from python setup.py -v config_fc --fcompiler=gnu95 build

2007-07-07 Thread Mathew
Running from numpy source directory. F2PY Version 2_3875 blas_opt_info: blas_mkl_info: ( library_dirs = /u/vento0/myeates/lib ) ( include_dirs = /u/vento0/myeates/include ) (paths: ) (paths: ) (paths: ) (paths: ) (paths: ) (paths: ) libraries mkl,vml,guide not found in /u/vento0/myeates/lib N

Re: [Numpy-discussion] Python equivalent of bwboundaries, bwlabel

2007-07-07 Thread ANIRUDH VIJ
OpenCV comes with python wrappers.That should help to do pretty much any image processing task. On Fri, 29 Jun 2007 12:15:10 +0300, Nadav Horesh wrote > There are several image processing function (including labeling) in > numpy.numarray.nd_image package. You can find nd_image documentation > in

Re: [Numpy-discussion] [Image-SIG] Python equivalent of bwboundaries, bwlabel

2007-07-07 Thread Mark Asbach
Hi Nadav, > There are several image processing function (including labeling) in > numpy.numarray.nd_image package. You can find nd_image > documentation in numarray-1.5.pdf (http://downloads.sourceforge.net/ > numpy/numarray-1.5.pdf?modtime=1133880381&big_mirror=0) >> I'm trying to do object

[Numpy-discussion] Problems with RandomArray

2007-07-07 Thread Alexander Dietz
Hi, I am not sure how to subscribe to this mailing list (there was no link for that, just this email adress), but hopefully someone will get this email and can me subscribe to this list, answer my question or ask someone else. Anyway, here is my question: I am using python with matplotlib versi

[Numpy-discussion] NumPy name? homepage?

2007-07-07 Thread Kevin Christman
I'm doing a quick cleanup of NumPy on wikipedia. 1. What is the proper name? NumPy or Numerical Python? (I understand that numarray and numeric are older, and now deprecated versions.) If it is NumPy then I would suggest renaming the page to that and then *only* talk about the other (confusing)

[Numpy-discussion] scipy.test() warnings, errors and failures

2007-07-07 Thread [EMAIL PROTECTED]
Hi, I just installed numpy (1.0.3) and scipy (0.5.2) on a Windows machine running Python 2.5.1. They both complete installation, and numpy.test() reports no errors. scipy.test() produces a huge stream (see below) of warnings, errors (19), and failures (2), however. Also, there's a deprecation warni

[Numpy-discussion] arange and linspace could take an output array

2007-07-07 Thread Carlos Pita
Hi all, I have a few cases where an output array with samples for a linear envelope should be composed by several linear segments, each one the output of arange o linspace. It would be preferable in terms of performance to write this segments directly to subviews of the output array instead of gen

[Numpy-discussion] arange and linspace could take an output array

2007-07-07 Thread Carlos Pita
Hi all, I have a few cases where an output array with samples for a linear envelope should be composed by several linear segments, each one the output of arange o linspace. It would be preferable in terms of performance to write this segments directly to subviews of the output array instead of gen

Re: [Numpy-discussion] Should bool_ subclass int?

2007-07-07 Thread Timothy Hochberg
On 7/6/07, Travis Oliphant <[EMAIL PROTECTED]> wrote: Timothy Hochberg wrote: > > I'm working on getting some old code working with numpy and I noticed > that bool_ is not a subclass of int. Given that python's bool > subclasses into and that the other scalar types are subclasses of > their resp

Re: [Numpy-discussion] Buildbot for numpy

2007-07-07 Thread stefan
On Mon, 2 Jul 2007 17:26:15 -0700, "Barry Wark" <[EMAIL PROTECTED]> wrote: > On a side note, buildbot.scipy.org goes to the DSP lab, Univ. of > Stellenbosch's home page, not the buildbot status page. Sorry about that -- I misconfigured Apache. Everything should be fine now. Cheers Stéfan