Re: [Numpy-discussion] Efficiently defining a multidimensional array

2009-08-27 Thread Damian Eads
_ > NumPy-Discussion mailing list > NumPy-Discussion@scipy.org > http://mail.scipy.org/mailman/listinfo/numpy-discussion > -- - Damian Eads Ph.D. Candidate University of California

Re: [Numpy-discussion] Distance Formula on an Array

2009-05-12 Thread Damian Eads
ttp://mail.scipy.org/mailman/listinfo/numpy-discussion ----- Damian Eads Ph.D. Candidate Jack Baskin School of Engineering, UCSCE2-489 1156 High Street Machine Learning Lab Santa Cruz, CA 95064h

Re: [Numpy-discussion] Distance Formula on an Array

2009-05-12 Thread Damian Eads
rean Distance Formula) > > Ideas? > Thanks, > Ian > > ___ > Numpy-discussion mailing list > Numpy-discussion@scipy.org > http://mail.scipy.org/mailman/listinfo/numpy-discussion > > -

Re: [Numpy-discussion] A buildbot farm with shell access - for free ?

2009-01-28 Thread Damian Eads
rg > http://projects.scipy.org/mailman/listinfo/numpy-discussion > -- Sent from my mobile device - Damian Eads Ph.D. Student Jack Baskin School of Engineering, UCSCE2-489 115

Re: [Numpy-discussion] Support for sparse matrix in Distance function (and clustering)?

2008-12-09 Thread Damian Eads
rg/mailman/listinfo/numpy-discussion > -- --------- Damian Eads Ph.D. Student Jack Baskin School of Engineering, UCSCE2-489 1156 High Street Machine Learning Lab Santa Cruz, CA 95064http://www.soe.ucsc.edu/~eads _

Re: [Numpy-discussion] numpy-docs and sphinx

2008-11-14 Thread Damian Eads
ion, > at least (I think) if it is not a very old one. Are you able to upgrade > your Latex, or get the file eg. from CTAN? > > If not, you can just edit sphinx/ext/pngmath.py, and adjust the > \usepackage[utf8]{inputenc} line in it. > > Pauli > >

Re: [Numpy-discussion] distance matrix and (weighted) p-norm

2008-09-08 Thread Damian Eads
Emanuele Olivetti wrote: > Hi, > > I'm trying to compute the distance matrix (weighted p-norm [*]) > between two sets of vectors (data1 and data2). Example: > > import numpy as N > p = 3.0 > data1 = N.random.randn(100,20) > data2 = N.random.randn(80,20) > weight = N.random.rand(20) > distance_mat

Re: [Numpy-discussion] distance matrix and (weighted) p-norm

2008-09-07 Thread Damian Eads
gt; Excellent. I was thinking about something similar. I'll have a look > to the separate package. Please drop an email to this list when > distance will be moved. > > Thanks, > > Emanuele - Damian Eads

[Numpy-discussion] sprint: IRC chat?

2008-08-23 Thread Damian Eads
Friends, Are we meeting over IRC chat? I'd like to help with the sprint but remotely. I have to leave LA today, unfortunately. Thanks! Damian ___ Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.scipy.org/mailman/listinfo/numpy

[Numpy-discussion] asarray issue with type codes

2008-07-28 Thread Damian Eads
Hi there, I ran into a little problem in some type checking code for a C extension I'm writing. I construct X as a C-long array and then I cast it to a C-int array Y, however the type code does not change. However, when I try constructing the array from scratch as a C-int, I get the right type cod

Re: [Numpy-discussion] Numpy Array filling

2008-07-03 Thread Damian Eads
> On Thu, Jul 3, 2008 at 6:57 AM, Brain Stormer <[EMAIL PROTECTED]> wrote: >> I am using numpy to create an array then filling some of the values >> using a >> for loop, I was wondering if there is way to easily fill the values >> without >> iterating through sort of like "array.fill[start:stop,sta

[Numpy-discussion] copying in nanXXX

2008-06-29 Thread Damian Eads
Hi there, I'm using nansum for some code and noticed it does a bit of copying. Specifically, the nanxxx functions copy the input array, create an isnan boolean mask, set the nan values to make them insignificant (nansum: 0, nanmin: inf, or nanmax: -inf), and then call xxx to compute the statist

Re: [Numpy-discussion] [numpy-discussion] inconsistent behavior in binary_repr

2008-06-04 Thread Damian Eads
Whoops. In one xterm, I'm going off the Fedora package and in the other, the SVN source tree. SVN seems to work. Sorry for the unnecessary message. On Wed, Jun 4, 2008 at 2:59 AM, Robert Kern wrote: > In [27]: numpy.binary_repr(0, width=8) > Out[27]: '0' > > Is this what the output is intende

[Numpy-discussion] inconsistent behavior in binary_repr

2008-06-04 Thread Damian Eads
Hi, I noticed some odd behavior in binary_repr when the width parameter is used. In most cases it works, In [23]: numpy.binary_repr(1, width=8) Out[23]: '0001' In [24]: numpy.binary_repr(2, width=8) Out[24]: '0010' In [25]: numpy.binary_repr(3, width=8) Out[25]: '0011' In [26]: nu

Re: [Numpy-discussion] Faster

2008-05-05 Thread Damian Eads
Hi, Looks like a fun discussion: it's too bad for me I did not join it earlier. My first try at scipy-cluster was completely in Python. Like you, I also tried to find the most efficient way to transform the distance matrix when joining two clusters. Eventually my data sets became big enough t

Re: [Numpy-discussion] [SciPy-dev] [IT] Maintenance and scheduled downtime this evening and weekend

2008-05-02 Thread Damian Eads
Will this effect SVN and Trac access? Thanks! Damian Peter Wang wrote: > Hi everyone, > > This evening and this weekend, we will be doing a major overhaul of > Enthought's internal network infrastructure. We will be cleaning up a > large amount of legacy structure and transitioning to a mo

Re: [Numpy-discussion] very simple iteration question.

2008-04-30 Thread Damian Eads
Hi Alex, a g wrote: > Hi. This is a very basic question, sorry if it's irritating. If i > didn't find the answer written already somewhere on the site, please > point me to it. That'd be great. You should look at any of the documents below and read up on array slicing. It is perhaps the most

Re: [Numpy-discussion] Win32 installer: please test it

2008-04-15 Thread Damian Eads
David Cournapeau wrote: > Jarrod Millman wrote: >> Hello, >> >> David Cournapeau has prepared a new win32 installer, which is aimed at >> solving the recurring problem of non working atlas on different sets >> of CPU. This installer simply checks which cpu you have, and installs >> the appropriate

Re: [Numpy-discussion] Win32 installer: please test it

2008-04-13 Thread Damian Eads
David Cournapeau wrote: > Jarrod Millman wrote: >> Hello, >> >> David Cournapeau has prepared a new win32 installer, which is aimed at >> solving the recurring problem of non working atlas on different sets >> of CPU. This installer simply checks which cpu you have, and installs >> the appropriate

Re: [Numpy-discussion] How to set array values based on a condition?

2008-03-24 Thread Damian Eads
_signbit.c umathmodule.c.src Please advise. Thank you. Damian ----- Damian Eads Ph.D. Student Jack Baskin School of Engineering, UCSCE2-381 1156 High Street Santa Cruz, CA 95064http://www.soe.ucsc.edu/~eads D

Re: [Numpy-discussion] How to set array values based on a condition?

2008-03-23 Thread Damian Eads
Damian Eads wrote: > Anne Archibald wrote: >> On 23/03/2008, Damian Eads <[EMAIL PROTECTED]> wrote: >>> Hi, >>> >>> I am working on a memory-intensive experiment with very large arrays so >>> I must be careful when allocating memory. Numpy al

Re: [Numpy-discussion] How to set array values based on a condition?

2008-03-23 Thread Damian Eads
Anne Archibald wrote: > On 23/03/2008, Damian Eads <[EMAIL PROTECTED]> wrote: >> Hi, >> >> I am working on a memory-intensive experiment with very large arrays so >> I must be careful when allocating memory. Numpy already supports a >> number of in-place o

[Numpy-discussion] How to set array values based on a condition?

2008-03-22 Thread Damian Eads
Hi, I am working on a memory-intensive experiment with very large arrays so I must be careful when allocating memory. Numpy already supports a number of in-place operations (+=, *=) making the task much more manageable. However, it is not obvious to me out I set values based on a very simple c

Re: [Numpy-discussion] Numpy and OpenMP

2008-03-15 Thread Damian Eads
I am forwarding a response from one of my colleagues, Edward Rosten. Edward Rosten writes: Anne Archibald wrote: > On 15/03/2008, Damian Eads <[EMAIL PROTECTED]> wrote: > > Robert Kern wrote: > > > Eric Jones tried to use multithreading to split the computation >

Re: [Numpy-discussion] Numpy and OpenMP

2008-03-15 Thread Damian Eads
k it's fair to paint multithreaded programming with the same brush just because there exist pathologies. Robert: what benchmarks were performed showing less than pleasing performance gains? Anne Archibald wrote: > On 15/03/2008, Damian Eads <[EMAIL PROTECTED]> wrote: >> Robert K

Re: [Numpy-discussion] Numpy and OpenMP

2008-03-15 Thread Damian Eads
Robert Kern wrote: > On Sat, Mar 15, 2008 at 2:48 PM, Gnata Xavier <[EMAIL PROTECTED]> wrote: >> Hi, >> >> Numpy is great : I can see several IDL/matlab projects switching to numpy :) >> However, it would be s nice to be able to put some OpenMP into the >> numpy code. >> >> It would be nice

Re: [Numpy-discussion] calculating weighted majority using two 3D arrays

2008-03-06 Thread Damian Eads
Hi Gregory, Gregory, Matthew wrote: > Eads, Damian wrote: >> You may need to be a bit more specific by what you mean by >> weighted majority. What are the range of values for values >> and weights, specifically? This sounds a lot like pixel >> classification where each pixel is classified with

Re: [Numpy-discussion] calculating weighted majority using two 3D arrays

2008-03-05 Thread Damian Eads
Gregory, Matthew wrote: > Hi list, > > I'm a definite newbie to numpy, but finding the library to be incredibly > useful. > > I'm trying to calculate a weighted majority using numpy functions. I > have two sets of image stacks (one is values, the other weights) that I > read into 3D numpy arrays

Re: [Numpy-discussion] numpy and roundoff(?)

2008-03-01 Thread Damian Eads
Lisandro Dalcin wrote: > On 3/1/08, Charles R Harris <[EMAIL PROTECTED]> wrote: >> So they differ in the least significant bit. Not surprising, I expect the >> Fortran compiler might well perform operations in different order, >> accumulate in different places, etc. It might also accumulate in high

Re: [Numpy-discussion] how to pronounce numpy?

2008-03-01 Thread Damian Eads
Robert Kern wrote: > On Sat, Mar 1, 2008 at 6:45 PM, Lisandro Dalcin <[EMAIL PROTECTED]> wrote: >> Sorry for the stupid question, but my English knowledge just covers >> reading and writting (the last, not so good) >> >> At the very begining, http://scipy.org/ says >> >> SciPy (pronounced "Sigh

Re: [Numpy-discussion] A little help please?

2008-02-29 Thread Damian Eads
Neal Becker wrote: > Sounds like this needs a bit of re-thinking. > > Given a set of function signatures: > F(a,b,c) > F(d,e,f) > ... > > The user calls: > F(A,B,C) (no relation between a,A ,etc) > > How do we find the 'best' match? > > I think we can start with: > Rules: > 1) Only allowed (at

Re: [Numpy-discussion] Matching 0-d arrays and NumPy scalars

2008-02-21 Thread Damian Eads
While we are on the subject of indexing... I use xranges all over the place because I tend to loop over big data sets. Thus I try avoid to avoid allocating large chunks of memory unnecessarily with range. While I try to be careful not to let xranges propagate to the ndarray's [] operator, there

Re: [Numpy-discussion] Matching 0-d arrays and NumPy scalars

2008-02-21 Thread Damian Eads
In MATLAB, scalars are 1x1 arrays, and thus they can be indexed. There have been situations in my use of Numpy when I would have liked to index scalars to make my code more general. It's not a very pressing issue for me but it is an interesting issue. Whenever I index an array with a sequence o

Re: [Numpy-discussion] CTypes: How to incorporate a library with shared library module?

2008-02-11 Thread Damian Eads
Robert Kern wrote: > On Feb 12, 2008 12:14 AM, Damian Eads <[EMAIL PROTECTED]> wrote: >> David Cournapeau wrote: >>> On Mon, 2008-02-11 at 22:50 -0700, Damian Eads wrote: >>>> Dear Lou, >>>> >>>> You may want to try using distutils or s

Re: [Numpy-discussion] CTypes: How to incorporate a library with shared library module?

2008-02-11 Thread Damian Eads
David Cournapeau wrote: > On Mon, 2008-02-11 at 22:50 -0700, Damian Eads wrote: >> Dear Lou, >> >> You may want to try using distutils or setuputils, which makes compiling >> extensions much easier. It does the hard work of finding out which flags >> are needed

Re: [Numpy-discussion] CTypes: How to incorporate a library with shared library module?

2008-02-11 Thread Damian Eads
Dear Lou, You may want to try using distutils or setuputils, which makes compiling extensions much easier. It does the hard work of finding out which flags are needed to compile extensions on the host platform. There are many examples on the web on how to use distutils to build C extensions (h

Re: [Numpy-discussion] Numpy and C++ integration...

2008-02-05 Thread Damian Eads
Dear Vince, You probably have heard better solutions but I think what I do works and is simple to learn. When I need to call C++ code from Python, I write a wrapper extern "C" function that calls the C++ function that returns the result. Then I just use ctypes to call the extern "C" function fr

Re: [Numpy-discussion] Unexpected behavior with numpy array

2008-02-03 Thread Damian Eads
Robert Kern wrote: > Damian Eads wrote: >> Here's another question: is there any way to construct a numpy array and >> specify the buffer address where it should store its values? I ask >> because I would like to construct numpy arrays that work on buffers that >&

Re: [Numpy-discussion] Unexpected behavior with numpy array

2008-02-03 Thread Damian Eads
Thanks Anne for your very informative response. Anne Archibald wrote: > On 03/02/2008, Damian Eads <[EMAIL PROTECTED]> wrote: >> Good day, >> >> Reversing a 1-dimensional array in numpy is simple, >> >> A = A[:,:,-1] . >> >> However

Re: [Numpy-discussion] Unexpected behavior with numpy array

2008-02-03 Thread Damian Eads
Damian Eads wrote: > Good day, > > Reversing a 1-dimensional array in numpy is simple, > > A = A[:,:,-1] . Err, I meant A=A[::-1] here. My apologies. ___ Numpy-discussion mailing list Numpy-discussion@scipy.org http://pro

[Numpy-discussion] Unexpected behavior with numpy array

2008-02-03 Thread Damian Eads
Good day, Reversing a 1-dimensional array in numpy is simple, A = A[:,:,-1] . However A is a new array referring to the old one and is no longer contiguous. While trying to reverse an array in place and keep it contiguous, I encountered some weird behavior. The reason for keeping it c