You know, for linkage clustering and BHC, I've found it a lot easier
to work with an intermediate 1d map of indices and never resize the
distance matrix. I then just remove one element from this map at each
iteration, which is a LOT faster than removing a column and a row from
a matrix. if idxmap
On Fri, 2 May 2008 23:34:19 -0700 (PDT)
wilson <[EMAIL PROTECTED]> wrote:
> I am trying out the eigenvectors related functions in
>numpy.linalg.I
> came across some portions where i have doubts.
> 1).
> i have an array X
> if i calculate L=dot(X,X.transpose())
> can L be called the covariance m
I am trying out the eigenvectors related functions in numpy.linalg.I
came across some portions where i have doubts.
1).
i have an array X
if i calculate L=dot(X,X.transpose())
can L be called the covariance matrix of X?I read so in a paper by
Turk&Pentland(equation 3 i think)
can someone clarify t
Lisandro Dalcin wrote:
>
> Perhaps cleaner is not the right word. I actually believe that is far
> more portable, regarding the oddities of dlopening in different
> platforms.
I am sorry, I don't understand why a struct is less sensitive to
platform issues than function pointers when dynamically
On Fri, May 2, 2008 at 10:48 PM, Keith Goodman <[EMAIL PROTECTED]> wrote:
> On Fri, May 2, 2008 at 7:25 PM, Robert Kern <[EMAIL PROTECTED]> wrote:
> > In [5]: def kerndist(x):
> >...: N = x.shape[0]
> >...: x.flat[::N+1] = x.max()
> >...: ij = argmin(x.flat)
> >...
On Fri, May 2, 2008 at 7:25 PM, Robert Kern <[EMAIL PROTECTED]> wrote:
> In [5]: def kerndist(x):
>...: N = x.shape[0]
>...: x.flat[::N+1] = x.max()
>...: ij = argmin(x.flat)
>...: i, j = divmod(ij, N)
>...: return i, j
I replaced
ij = argmin(x.flat)
with
On Fri, May 2, 2008 at 7:36 PM, Charles R Harris
<[EMAIL PROTECTED]> wrote:
> On Fri, May 2, 2008 at 8:02 PM, Keith Goodman <[EMAIL PROTECTED]> wrote:
> > If the clustering gives me useful results, I'll ask you about your
> > boost code. I'll also take a look at Damian Eads's scipy-cluster.
>
> Tha
On Fri, May 2, 2008 at 7:25 PM, Robert Kern <[EMAIL PROTECTED]> wrote:
> On Fri, May 2, 2008 at 9:02 PM, Keith Goodman <[EMAIL PROTECTED]> wrote:
> > You're right. Finding the distance is slow. Is there any way to speed
> > up the function below? It returns the row and column indices of the
>
On Fri, May 2, 2008 at 8:02 PM, Keith Goodman <[EMAIL PROTECTED]> wrote:
> On Fri, May 2, 2008 at 6:29 PM, Charles R Harris
> <[EMAIL PROTECTED]> wrote:
> > Isn't the lengthy part finding the distance between clusters? I can
> think
> > of several ways to do that, but I think you will get a real
On Fri, May 2, 2008 at 9:02 PM, Keith Goodman <[EMAIL PROTECTED]> wrote:
> On Fri, May 2, 2008 at 6:29 PM, Charles R Harris
>
> <[EMAIL PROTECTED]> wrote:
>
> > Isn't the lengthy part finding the distance between clusters? I can think
> > of several ways to do that, but I think you will get a rea
On Fri, May 2, 2008 at 8:02 PM, Keith Goodman <[EMAIL PROTECTED]> wrote:
> On Fri, May 2, 2008 at 6:29 PM, Charles R Harris
> <[EMAIL PROTECTED]> wrote:
> > Isn't the lengthy part finding the distance between clusters? I can
> think
> > of several ways to do that, but I think you will get a real
On Fri, May 2, 2008 at 6:29 PM, Charles R Harris
<[EMAIL PROTECTED]> wrote:
> Isn't the lengthy part finding the distance between clusters? I can think
> of several ways to do that, but I think you will get a real speedup by doing
> that in c or c++. I have a module made in boost python that holds
On Fri, May 2, 2008 at 7:16 PM, Keith Goodman <[EMAIL PROTECTED]> wrote:
> On Fri, May 2, 2008 at 6:05 PM, Robert Kern <[EMAIL PROTECTED]> wrote:
> > On Fri, May 2, 2008 at 7:24 PM, Keith Goodman <[EMAIL PROTECTED]>
> wrote:
> >
> >
> > > How can I make this function faster? It removes the i-th ro
On Fri, May 2, 2008 at 6:05 PM, Robert Kern <[EMAIL PROTECTED]> wrote:
> On Fri, May 2, 2008 at 7:24 PM, Keith Goodman <[EMAIL PROTECTED]> wrote:
>
>
> > How can I make this function faster? It removes the i-th row and
> > column from an array.
> >
> > def cut(x, i):
> > idx = range(x.sha
On Fri, May 2, 2008 at 7:24 PM, Keith Goodman <[EMAIL PROTECTED]> wrote:
> How can I make this function faster? It removes the i-th row and
> column from an array.
>
> def cut(x, i):
> idx = range(x.shape[0])
> idx.remove(i)
> y = x[idx,:]
> y = y[:,idx]
> return y
>
> >> imp
On Fri, May 2, 2008 at 5:47 PM, Keith Goodman <[EMAIL PROTECTED]> wrote:
>
> On Fri, May 2, 2008 at 5:38 PM, Charles R Harris
> <[EMAIL PROTECTED]> wrote:
> > On Fri, May 2, 2008 at 6:24 PM, Keith Goodman <[EMAIL PROTECTED]> wrote:
> > > How can I make this function faster? It removes the i-th r
On Fri, May 2, 2008 at 5:38 PM, Charles R Harris
<[EMAIL PROTECTED]> wrote:
> On Fri, May 2, 2008 at 6:24 PM, Keith Goodman <[EMAIL PROTECTED]> wrote:
> > How can I make this function faster? It removes the i-th row and
> > column from an array.
> >
>
> Why do you want to do that?
Single linkage c
On Fri, May 2, 2008 at 6:24 PM, Keith Goodman <[EMAIL PROTECTED]> wrote:
> How can I make this function faster? It removes the i-th row and
> column from an array.
>
Why do you want to do that?
Chuck
___
Numpy-discussion mailing list
Numpy-discussion@s
How can I make this function faster? It removes the i-th row and
column from an array.
def cut(x, i):
idx = range(x.shape[0])
idx.remove(i)
y = x[idx,:]
y = y[:,idx]
return y
>> import numpy as np
>> x = np.random.rand(500,500)
>> timeit cut(x, 100)
100 loops, best of 3: 16.8
http://narray.rubyforge.org/matrix-e.html
It seems they've implemented some of what Tim is looking for, in
particular. Perhaps there is information to be gleaned from what they
are doing. It looks promising..
-Travis
___
Numpy-discussion mailing
On Fri, 2 May 2008, Christopher Barker wrote:
> Why not just scale to -pi to pi right there?
Dunno, Chris. As I wrote to Anne (including a couple of files and the
resulting plot), it's been almost three decades since I dealt with the math
underlying distribution functions.
> Which is why you
Anne Archibald wrote:
> 2008/5/2 Rich Shepard <[EMAIL PROTECTED]>:
> No, no. You *want* scaled_x to range from -1 to 1.
Why not just scale to -pi to pi right there?
(The 0.998 is because you didn't include the endpoint, 100.)
Which is why you want linspace, rather than arange. Really, trust me
On May 2, 2008, at 5:45 PM, Damian Eads wrote:
> Will this effect SVN and Trac access?
> Thanks!
> Damian
Yes, this affects svn, trac, web, mailing lists,...everything, because
we will be working on the underlying network infrastructure.
-Peter
___
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
2008/5/2 Rich Shepard <[EMAIL PROTECTED]>:
> On Fri, 2 May 2008, Anne Archibald wrote:
>
> > It's better not to work point-by-point, appending things, when working
> > with numpy. Ideally you could find a formula which just produced the right
> > curve, and then you'd apply it to the input vecto
On Fri, 2 May 2008, Anne Archibald wrote:
> It's better not to work point-by-point, appending things, when working
> with numpy. Ideally you could find a formula which just produced the right
> curve, and then you'd apply it to the input vector and get the output
> vector all at once.
Anne,
T
2008/5/2 Rich Shepard <[EMAIL PROTECTED]>:
>What will work (I call it a pi curve) is a matched pair of sigmoid curves,
> the ascending curve on the left and the descending curve on the right. Using
> the Boltzmann function for these I can calculate and plot each individually,
> but I'm havi
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 more
maintainable, better documented configuration.
We have planned the work so tha
On Fri, 2 May 2008, Christopher Barker wrote:
> this could use some serious vectorization/numpyification! Poke around the
> scipy Wiki and whatever other tutorials you can find -- you'll be glad you
> did. A hint:
>
> When you are writing a loop like:
>>for i in xL:
>> x.append(xL
Rich,
this could use some serious vectorization/numpyification! Poke around
the scipy Wiki and whatever other tutorials you can find -- you'll be
glad you did. A hint:
When you are writing a loop like:
> for i in xL:
> x.append(xL[i])
You should be doing array operations!
Sp
On Fri, 2 May 2008, Angus McMorland wrote:
> How about multiplying two Boltzmann terms together, ala:
>
> f(x) = 1/(1+exp(-(x-flex1)/tau1)) * 1/(1+exp((x-flex2)/tau2))
> You'll find if your two flexion points get too close together, the peak
> will drop below the maximum for each individual curve
2008/5/2 Rich Shepard <[EMAIL PROTECTED]>:
>When I last visited I was given excellent advice about Gaussian and other
> bell-shaped curves. Upon further reflection I realized that the Gaussian
> curves will not do; the curve does need to have y=0.0 at each end.
>
>I tried to apply a Beta
When I last visited I was given excellent advice about Gaussian and other
bell-shaped curves. Upon further reflection I realized that the Gaussian
curves will not do; the curve does need to have y=0.0 at each end.
I tried to apply a Beta distribution, but I cannot correlate the alpha and
bet
On 5/1/08, David Cournapeau <[EMAIL PROTECTED]> wrote:
> On Wed, 2008-04-30 at 16:44 -0300, Lisandro Dalcin wrote:
> > David, in order to put clear what I was proposing to you in previous
> > mail regarding to implementing plugin systems for numpy, please take a
> > look at the attached tarball.
Charles R Harris wrote:
> A1 += A2[:,:,newaxis] is one way.
Exactly what I was looking for -- thanks Charles (and Ann)
-Chris
--
Christopher Barker, Ph.D.
Oceanographer
Emergency Response Division
NOAA/NOS/OR&R(206) 526-6959 voice
7600 Sand Point Way NE (206) 526-6329 fax
Se
Does anyone could help me generate an executable program that functions for the
bounce.py with py2exe?
Thank you
bounce.py:
from visual import *
from numpy import *
ball = sphere(pos=(0,4,0), color=color.red)
example = zeros((10,10),dtype=float)
print (example)
setup.py:
from
36 matches
Mail list logo