Frank | 1 May 10:47 2005
Picon

ImportError for scipy.xplt

Hi all,

I have a problem with importing the xplt part of scipy:

Python 2.4.1 (#2, Apr  2 2005, 04:26:17)
[GCC 3.3.5 (Debian 1:3.3.5-12)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from scipy.xplt import *
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
  File "/usr/lib/python2.4/site-packages/scipy_base/ppimport.py", line 303, in 
__getattr__
    module = self._ppimport_importer()
  File "/usr/lib/python2.4/site-packages/scipy_base/ppimport.py", line 258, in 
_ppimport_importer
    raise ImportError,self.__dict__.get('_ppimport_exc_info')[1]
ImportError: Array can not be safely cast to required type
>>>   

Importing other parts of scipy works fine (from scipy.integrate import *).

This happens on Debian Sarge (AMD64) with scipy-0.3.2 under python-2.4.1 and 
python-2.3.5

Has anybody experienced the same or a solution?

Thanks,
Frank
Kazuhiko UEBAYASHI | 2 May 09:39 2005

How to make the matrix include variable "x"

I'm trying to use SciPy module.

Is it possble to make the following Matrix using SciPy ?

  A(x) = (x**0 x**1 x**2 ).

I tried in Python with SciPy
  	>> from scipy import *
	>> x0 = 10; x1 = 8; x2 = 3
	>> print mat('[x0; x1; x2]')
	Matrix([[0],
	       [1],
	       [2]])
. I expected the answer 
  Matrix([[10],
         [8],
         [3]])
but it didn't work well.

---
Kazuhiko UEBAYASHI
u_kazu(a)nifty.com
Robert Kern | 2 May 09:55 2005

Re: How to make the matrix include variable "x"

Kazuhiko UEBAYASHI wrote:
> I'm trying to use SciPy module.
> 
> Is it possble to make the following Matrix using SciPy ?
> 
>   A(x) = (x**0 x**1 x**2 ).
> 
> 
> I tried in Python with SciPy
>   	>> from scipy import *
> 	>> x0 = 10; x1 = 8; x2 = 3
> 	>> print mat('[x0; x1; x2]')
> 	Matrix([[0],
> 	       [1],
> 	       [2]])
> . I expected the answer 
>   Matrix([[10],
>          [8],
>          [3]])
> but it didn't work well.

When mat() is interpreting a string, it doesn't evaluate variables. In
this case, it's ignoring the 'x' characters.

You want

mat([[x0], [x1], [x2]])

--

-- 
Robert Kern
(Continue reading)

David Grant | 2 May 11:37 2005
Picon

Re: How to make the matrix include variable "x"

On May 2, 2005 12:39 am, Kazuhiko UEBAYASHI wrote:
> I'm trying to use SciPy module.
>
> Is it possble to make the following Matrix using SciPy ?
>
>   A(x) = (x**0 x**1 x**2 ).

I'm not sure what you're trying to do here, but it doesn't seem relevant for 
what you do below.

> I tried in Python with SciPy
>
>   	>> from scipy import *
> 	>>
> 	>> x0 = 10; x1 = 8; x2 = 3
> 	>> print mat('[x0; x1; x2]')

You probably meant to do:

print mat([x0, x1, x2])

Your first error was putting the quotes '...' and your second error was the 
semicolons. I think that comes from a column vector notation in matlab but 
I'm not sure.

> 	Matrix([[0],
> 	       [1],
> 	       [2]])
> . I expected the answer
>   Matrix([[10],
(Continue reading)

Eric Zollars | 2 May 20:11 2005
Picon

install problems

There are ATLAS libraries installed on the system that are incompatible
with the scipy install.  I have built my own ATLAS/LAPACK libraries but
how do I block setup.py from looking in /usr/lib and /usr/local/lib?  I
have tried setting $BLAS and $LAPACK, but that doesn't help.  I still
get Import Errors with the wrong library listed.

Any help is appreciated.
Eric
Darren Dale | 2 May 20:26 2005
Picon

Re: install problems

Hi Eric,

On Monday 02 May 2005 2:11 pm, Eric Zollars wrote:
> There are ATLAS libraries installed on the system that are incompatible
> with the scipy install.  I have built my own ATLAS/LAPACK libraries but
> how do I block setup.py from looking in /usr/lib and /usr/local/lib?  I
> have tried setting $BLAS and $LAPACK, but that doesn't help.  I still
> get Import Errors with the wrong library listed.
>

Try editing scipy_core/scipy_distutils/sample_site.cfg and save it as 
site.cfg. Also, if you are not installing from CVS, you need to edit six 
lines in system_info.py, in that same directory, starting at line #285

         try:
             f = __file__
         except NameError,msg:
             f = sys.argv[0]
         cf = os.path.join(os.path.split(os.path.abspath(f))[0],
                           'site.cfg')

hope this helps,
Darren

--

-- 
Darren S. Dale

Bard Hall
Department of Materials Science and Engineering
Cornell University
(Continue reading)

Eric Zollars | 3 May 02:42 2005
Picon

Re: install problems

On Mon, 2005-05-02 at 11:26, Darren Dale wrote:
> Hi Eric,
> 
> On Monday 02 May 2005 2:11 pm, Eric Zollars wrote:
> > There are ATLAS libraries installed on the system that are incompatible
> > with the scipy install.  I have built my own ATLAS/LAPACK libraries but
> > how do I block setup.py from looking in /usr/lib and /usr/local/lib?  I
> > have tried setting $BLAS and $LAPACK, but that doesn't help.  I still
> > get Import Errors with the wrong library listed.
> >
> 
> Try editing scipy_core/scipy_distutils/sample_site.cfg and save it as 
> site.cfg. Also, if you are not installing from CVS, you need to edit six 
> lines in system_info.py, in that same directory, starting at line #285
> 
>          try:
>              f = __file__
>          except NameError,msg:
>              f = sys.argv[0]
>          cf = os.path.join(os.path.split(os.path.abspath(f))[0],
>                            'site.cfg')
> 
> hope this helps,
> Darren

Thanks, that blocked setup.py from getting the wrong libs but nothing I
do seems to get scipy installed.

I had to modify site.cfg:
[DEFAULT]
(Continue reading)

Igor Carron | 3 May 03:04 2005
Picon

Install problem using windows binaries.

Hi, 

I am a newbie. I have an install problem.
I am using Win XP, on a celeron 1.2 Ghz.
I just tested the install I got from the binaries section ( Windows
Binaries, PIII on python 2.2.x at http://www.scipy.org/download/)
I have looked at the files that are not found (see below), yet they
are there. What did I do wrong ? Thank you in advance,

Igor.

>>> t=scipy.test()
   !! No test file 'test_Mplot.py' found for <module
'scipy.xplt.Mplot' from '...-packages\\scipy\\xplt\\Mplot.pyc'>
   !! No test file 'test_lena.py' found for <module 'scipy.plt.lena'
from '...te-packages\\scipy\\plt\\lena.pyc'>
   !! No test file 'test_build_py.py' found for <module
'scipy_distutils.command.build_py' from
'...distutils\\command\\build_py.pyc'>
   !! No test file 'test_gistC.py' found for <module
'scipy.xplt.gistC' from '...-packages\\scipy\\xplt\\gistC.pyd'>
  Found 4 tests for scipy.io.array_import
  Found 23 tests for scipy_base.function_base
   !! No test file 'test_ltisys.py' found for <module
'scipy.signal.ltisys' from '...ckages\\scipy\\signal\\ltisys.pyc'>
   !! No test file 'test_info_integrate.py' found for <module
'scipy.integrate.info_integrate' from
'...y\\integrate\\info_integrate.pyc'>
   !! No test file 'test_vq.py' found for <module 'scipy.cluster.vq'
from '...-packages\\scipy\\cluster\\vq.pyc'>
(Continue reading)

Robert Kern | 3 May 03:17 2005

Re: Install problem using windows binaries.

Igor Carron wrote:
> Hi, 
> 
> I am a newbie. I have an install problem.
> I am using Win XP, on a celeron 1.2 Ghz.
> I just tested the install I got from the binaries section ( Windows
> Binaries, PIII on python 2.2.x at http://www.scipy.org/download/)
> I have looked at the files that are not found (see below), yet they
> are there. What did I do wrong ? Thank you in advance,
> 
> Igor.
> 
> 
>>>>t=scipy.test()
> 
>    !! No test file 'test_Mplot.py' found for <module
> 'scipy.xplt.Mplot' from '...-packages\\scipy\\xplt\\Mplot.pyc'>

These are just informational warnings saying that there are no tests for 
these particular modules. Ignore them.

> ======================================================================
> ERROR: check_simple_todense (scipy.io.mmio.test_mmio.test_mmio_coordinate)
> ----------------------------------------------------------------------
> Traceback (most recent call last):
>   File "C:\Python22\Lib\site-packages\scipy\io\tests\test_mmio.py",
> line 152, in check_simple_todense
>     b = mmread(fn).todense()
>   File "C:\Python22\Lib\site-packages\scipy\sparse\Sparse.py", line
> 203, in todense
(Continue reading)

Joe Cooper | 3 May 03:25 2005

Re: Install problem using windows binaries.

Robert Kern wrote:
> 
> This is our fault, not yours. itertools is a standard library module 
> introduced in Python 2.3. If you don't need to use sparse matrices, you 
> can just ignore this. If you do need sparse matrices, you will need to 
> upgrade to Python 2.3. I recommend using Enthought's distribution of 
> Python 2.3.5 which has lots of modules, including Scipy, already 
> compiled and tested for you.

The "tested" part might be stretching it a little.  ;-)

We're working on being able to call it "tested", though.  And I will fix 
problems that get reported.

Gmane