James R. Phillips | 2 May 2004 23:44
Favicon

Unable to use weave in Enthought 0.3 Win binary install

Has anyone had success using weave in the
Enthought 0.3 Winows binary install?  I get
linker errors whether using the Enthought-supplied
Mingw32 or my MSVC++ 6.0 compiler.

My test

I have been through several install-reboot-test
cycles on two different XP boxen.  Arrgh.

If I knew the magic chants to get weave working
with Enthought's Mingw32 it would be sufficient.

     James Phillips
     http://zunzun.com
danny shevitz | 4 May 2004 01:07
Picon
Favicon

Re: problems with stats

Robert, 

thanks for the response. I haven't forgotten you wrote, I just haven't
had a chance to really dig into what you wrote. Now I have. 

So I have been using the frequentist approach to constructing the error
bars and I understand that. It involves taking some linear fractional
transformations of F statistics. After reading your letter, I was able
to compute the same error bounds directly. The key was the bdtri
function as you mentioned. 

pLower = bdtri(n-1, N, .95)
pUpper = bdtri(n, N, .05)

for example gives the .90 confidence interval. This is the pair of
functions I needed. The n-1 in pLower is because the value n is
considered in the tail for the purposes of computing the confidences.

I didn't have a prayer in scipy.stats because bdtri is not wrapped. Its
totally different than ppf, which still requires the unknown
probability in order to construct the distribution at all. 

So I can get the frequentist result directly, now I'm curious about
your Bayesian analysis. One of the uniform or improper prior gives the
same answer. BTW, I'm also curious if you left off the combinatoric
factor (n choose r) in your description. Can you give me a little of
the rational for choosing the improper prior?

thanks,
Danny
(Continue reading)

danny shevitz | 4 May 2004 01:10
Picon
Favicon

Re: problems with stats

sorry, for the post, I meant to send it to Robert not the group.

Danny

	
		
__________________________________
Do you Yahoo!?
Win a $20,000 Career Makeover at Yahoo! HotJobs  
http://hotjobs.sweepstakes.yahoo.com/careermakeover 
Nils Wagner | 4 May 2004 08:26
Picon

scipy.test() failed with latest cvs

======================================================================
ERROR: check_setelement (scipy.sparse.Sparse.test_Sparse.test_csc)
----------------------------------------------------------------------
Traceback (most recent call last):
   File 
"/usr/lib/python2.3/site-packages/scipy/sparse/tests/test_Sparse.py", 
line 67, in check_setelement
     a = self.datsp - self.datsp
   File "/usr/lib/python2.3/site-packages/scipy/sparse/Sparse.py", line 
379, in __sub__
     return csc_matrix(c,(rowc,ptrc),M=M,N=N)
   File "/usr/lib/python2.3/site-packages/scipy/sparse/Sparse.py", line 
294, in __init__
     self._check()
   File "/usr/lib/python2.3/site-packages/scipy/sparse/Sparse.py", line 
310, in _check
     if (nzmax>0) and (max(self.rowind[:nnz]) >= M):
ValueError: min() or max() arg is an empty sequence

----------------------------------------------------------------------
Ran 934 tests in 2.879s

FAILED (errors=1)
Karthikesh Raju | 4 May 2004 10:10
Picon
Picon

concatenation of arrays woes !!


Hi All,

is it possible to concatenate arrays along the column,

A[:,1:5] = concatenate(a,b,c)
a is 2x1, b 2x1, c 1x1

i have been trying to convert the following matlab code and this is my
stumbling block for several months :(

K = 3
CL = 5
L = 2
d -- (K,L) in the range (0,CL)
codes -- (K,CL)
window = 1
s = codes'

output S -(CL*window,K*L*(window+1)) matrix

for k = 1:K
for l = 1:L
    S(:,1+(window+1)*(l-1)+(window+1)*L*(k-1)) =
           [s(CL-d(k,l)+1:CL,k); zeros(CL*(window-1),1);zeros(CL-d(k,l),1)]
    S(:,(window+1)*1+(window+1)*L*(k-1)) =
           [zeros(d(k,l),1);zeros(CL*(window-1),1);s(1:CL-d(k,l),k)]
    for n=2:window
        S(:,n+(window+1)*(l-1)+(numbits+1)*L*(k-1)) =
           [zeros(d(k,l),1); zeros(CL*(n-2),1);
(Continue reading)

Nadav Horesh | 4 May 2004 12:05

Re: xplt documentation

I've made some testing (not exhaustive) of matplotlib under IDLE and pycrust on win32 and linux platforms.
matplotlib seems to be more tolerant then xplt, especially when show() is called instead of using the
interactive mode. The linux environment seems to work a bit better then the win32.

There is a project (not very active nowadays) called glplot (glplot.sf.net) which fills a shortcoming of
gnuplot of generating false colour map of large matrices (gnuplot is too slow here). Could the solution be
a library/utility that is spawned as a separate process and use some (simple) interprocess
communication (ala gnuplot/glplot)? Is there a portable alternative way to run a multiple
message-loops under the same process?

  Nadav.
Bob.Cowdery | 4 May 2004 11:20

Help with array functions

Hi all,
 
Can anyone help me convert this loop to an array function. I can't have loops in my signal processing as they take far too much processing power. This is a fragment from a speech processor using Ferkins formula. Essentially the gain array (m_procGain) which is 2048 long (m_sampl_sz) needs its nth element processing into it's (n-1)th element. This is eventually used to multiply the samples in m_complexout, the first 2048 elements of this are used. Attack is a scaler currently 0.4.

                peak = abs(self.m_complexout[argmax(abs(self.m_complexout[:self.m_sampl_sz]))])
                i = arange(1,self.m_sampl_sz)
                for x in i:
                    if abs(self.m_complexout[x-1]) > 0:
                       self.m_procGain[x] = ( (self.m_procGain[x-1] * (1 - attack)) + ((attack * peak) / abs(self.m_complexout[x-1])) )        
                       if self.m_procGain[x] > level:
                           self.m_procGain[x] = level
                    else:
                       self.m_procGain[x] = 1

Thanks for any assistance.
 
Bob
 
 
Bob Cowdery
CGI Senior Technical Architect
+44(0)1438 791517
Mobile: +44(0)7771 532138
 
 
 

*** Confidentiality Notice *** Proprietary/Confidential
Information belonging to CGI Group Inc. and its affiliates
may be contained in this message. If you are not a recipient
indicated or intended in this message (or responsible for
delivery of this message to such person), or you think for
any reason that this message may have been addressed to you
in error, you may not use or copy or deliver this message
to anyone else.  In such case, you should destroy this
message and are asked to notify the sender by reply email.

_______________________________________________
SciPy-user mailing list
SciPy-user <at> scipy.net
http://www.scipy.net/mailman/listinfo/scipy-user
Arnd Baecker | 4 May 2004 14:49
Picon

Re: Re: xplt documentation

Hi,

On Tue, 4 May 2004, Nadav Horesh wrote:

> I've made some testing (not exhaustive) of matplotlib under IDLE and
> pycrust on win32 and linux platforms. matplotlib seems to be more
> tolerant then xplt,

Can you be a bit more explicit, i.e. give examples ?

> especially when show() is called instead of
> using the interactive mode.

Personally I think that this is one of the big strengths
of scipy.xplt. For example, when debugging
I use a lot
  from IPython.Shell import IPythonShellEmbed
  ipshell = IPythonShellEmbed()

  ipshell()

The ipshell() can come at any point of your code
and all variables are available.
So a quick
  plg(some_array)
or
  pli(some_2d_array)
often allows to find bugs much more quickly
than anything else.

> The linux environment seems to work a
> bit better then the win32.
>
> There is a project (not very active nowadays) called glplot
> (glplot.sf.net) which fills a shortcoming of gnuplot of
> generating false colour map of large matrices (gnuplot is too slow here).

There is a patch on sourceforge for gnuplot which allows
for bitmap images (ie. matrices). I once tried it out and it is very nice.
It might take a little time until this gets integrated
as the gnuplot team seems to be a bit busy with
after release issues.

If you really want to go for large matrices have a look
at MayaVi,
  http://mayavi.sourceforge.net/
In particular
  http://mayavi.sourceforge.net/docs/guide/x967.html#TOOLS

Best,

Arnd
Gary Pajer | 4 May 2004 15:26
Picon
Favicon

Re: concatenation of arrays woes !!

----- Original Message ----- 
From: "Karthikesh Raju" <karthik <at> james.hut.fi>
To: <scipy-user <at> scipy.net>
Sent: Tuesday, May 04, 2004 4:10 AM
Subject: [SciPy-user] concatenation of arrays woes !!

>
> Hi All,
>
> is it possible to concatenate arrays along the column,
>
> A[:,1:5] = concatenate(a,b,c)
> a is 2x1, b 2x1, c 1x1
>
> i have been trying to convert the following matlab code and this is my
> stumbling block for several months :(
>
> K = 3
> CL = 5
> L = 2
> d -- (K,L) in the range (0,CL)
> codes -- (K,CL)
> window = 1
> s = codes'
>
> output S -(CL*window,K*L*(window+1)) matrix
>
> for k = 1:K
> for l = 1:L
>     S(:,1+(window+1)*(l-1)+(window+1)*L*(k-1)) =
>            [s(CL-d(k,l)+1:CL,k);
zeros(CL*(window-1),1);zeros(CL-d(k,l),1)]
>     S(:,(window+1)*1+(window+1)*L*(k-1)) =
>            [zeros(d(k,l),1);zeros(CL*(window-1),1);s(1:CL-d(k,l),k)]
>     for n=2:window
>         S(:,n+(window+1)*(l-1)+(numbits+1)*L*(k-1)) =
>            [zeros(d(k,l),1); zeros(CL*(n-2),1);
> s(:,k);zeros((window-n)*CL+CL-d(k,l),1)]
>     end
> end
> end
>
> --------------------
>
> This module has been my stumbling block for the last 2 months, had no
> problems with matlab, here i have all kinds of concatination woes. Please
> give me pointers on how to achieve such concatenations,
>
> thanks a lot
>
> regards
> karthik

I'm still not sure what you are trying to achieve.  If you post a minimal
contrived example of what you are trying to do instead of a clip from the
middle of your code it would be easier to figure out.

But have you explored r_[ ]  and c_[ ] ?   ('c' for column, 'r' for row)
These constructions are designed to aid concatenation:

>>> from scipy import *
>>> x=array([1,2])
>>> y=array([3,4])

>>> c_[x,y]
array([1, 2, 3, 4])

>>> c_[x[:,NewAxis],y[:,NewAxis]]
array([[1, 3],
       [2, 4]])

>>> r_[x[:,NewAxis],y[:,NewAxis]]
array([[1],
       [2],
       [3],
       [4]])

hth,
gary
John Hunter | 4 May 2004 15:31

Re: Re: xplt documentation

>>>>> "Arnd" == Arnd Baecker <arnd.baecker <at> web.de> writes:

    Arnd> There is a patch on sourceforge for gnuplot which allows for
    Arnd> bitmap images (ie. matrices). I once tried it out and it is
    Arnd> very nice.  It might take a little time until this gets
    Arnd> integrated as the gnuplot team seems to be a bit busy with
    Arnd> after release issues.

    Arnd> If you really want to go for large matrices have a look at
    Arnd> MayaVi, http://mayavi.sourceforge.net/ In particular
    Arnd> http://mayavi.sourceforge.net/docs/guide/x967.html#TOOLS

Also the fairly new imshow in matplotlib plots grayscale and
pseudocolor numeric/numarray arrays.  This replaces the painfully slow
pcolor which was unusable except for small arrays.  The guts of imshow
are implemented entirely in numeric and extension code and should
handle large arrays efficiently.  If you encounter performance issues,
I'd like to know about it!

Right now the only false colormap is ColormapJet (see
examples/pcolor_demo2.py) but you can define your own by subclassing
matplotlib.colors.Colormap.

JDH

Gmane