bruce | 1 Nov 05:45
Picon
Favicon

SciPY/NumPY - rhel4 installation issues....

Hi.

I'm trying to install numpy/scipy on a rhel system with python v2.4.3

I'm following the information from various sites. My goal is to be able to
successfully get numpy/scipy up/running, with a few basic tests.

I'm using the tar files for:
	drwxr-xr-x  6 root  root     4096 Oct 31 19:30 .
	drwxr-xr-x 32 root  root     4096 Oct 31 12:26 ..
	drwxr-xr-x 12 root  root     4096 Oct 31 18:29 ATLAS
	-rw-r--r--  1 root  root  3192987 Oct 31 12:35 atlas3.8.0.tar.gz
	drwxr-x---  8 13686  731     4096 Oct 31 18:11 lapack-3.1.1
	-rw-r--r--  1 root  root 10407595 Feb 26  2007 lapack-3.1.1.tgz
	drwxrwxr-x  4 test  test     4096 Oct 31 19:43 numpy-1.0.3.1
	-rw-r--r--  1 root  root  1500255 Oct 31 12:49 numpy-1.0.3.1.tar.gz
	-rw-r--r--  1 root  root       54 Oct 31 12:27 readme.txt
	drwxrwxr-x  3 test  test     4096 Sep 22 01:14 scipy-0.6.0
	-rw-r--r--  1 root  root  6572954 Oct 31 12:52 scipy-0.6.0.tar.gz

I believe I've successfully downloaded/built/installed the atlas/lapack
apps.

I'm using a RHEL4 system with a single 1.8GHz. processor.

I did a:
  "python setup.py install" for numpy, and it appeared to finish.

I then did a:
  "python setup.py install" for scipy, and got the following err:
(Continue reading)

Parvel Gu | 1 Nov 07:08
Picon

Re: Generating random variables in a joint normal distribution?

Hi,

Thanks so much for the reply. I could go furthur in this problem.

And here is the following issue:

In my understanding, the continues calls to random.multivariate_normal
would get a serials of random vairables which are all following the
joint normal distribution. Then what about how to reset the random
generating in each iteration?

Assuming that I have to simulate something for 50 iterations then to
get the average value. In each iteration I need a serial of random
pairs which follows the joint normal distrubition. The interations are
expected to be independent to each other.

Thus:

In iteration 1:
       serial = []
       in sub loop
          serial.append(random.multivariate_normal(m, cov))
       ...

And in iteration 2, I want a fresh serial which should not be affected
by the previous one        s. Is there any problem to empty the serial
then still call  random.multivariate_normal(m, cov) ?
In my understanding if there is no refresh or something performed to
the internal random generator, the random.multivariate_normal would
continue to generate variables in the context of the previous ones.
(Continue reading)

Robert Kern | 1 Nov 09:09
Picon
Gravatar

Re: Generating random variables in a joint normal distribution?

Parvel Gu wrote:
> Hi,
> 
> Thanks so much for the reply. I could go furthur in this problem.
> 
> And here is the following issue:
> 
> In my understanding, the continues calls to random.multivariate_normal
> would get a serials of random vairables which are all following the
> joint normal distribution. Then what about how to reset the random
> generating in each iteration?
> 
> Assuming that I have to simulate something for 50 iterations then to
> get the average value. In each iteration I need a serial of random
> pairs which follows the joint normal distrubition. The interations are
> expected to be independent to each other.
> 
> Thus:
> 
> In iteration 1:
>        serial = []
>        in sub loop
>           serial.append(random.multivariate_normal(m, cov))
>        ...
> 
> And in iteration 2, I want a fresh serial which should not be affected
> by the previous one        s. Is there any problem to empty the serial
> then still call  random.multivariate_normal(m, cov) ?
> In my understanding if there is no refresh or something performed to
> the internal random generator, the random.multivariate_normal would
(Continue reading)

Alexander Michael | 1 Nov 14:13
Picon

Re: SciPY/NumPY - rhel4 installation issues....

On 11/1/07, bruce <bedouglas <at> earthlink.net> wrote:
> I then did a:
>   "python setup.py install" for scipy, and got the following err:
>         [root <at> mfgtest3 <Branch GodzillaTest1.1.2> scipy-0.6.0]# python setup.py
> install
>         Traceback (most recent call last):
>           File "setup.py", line 53, in ?
>             setup_package()
>           File "setup.py", line 28, in setup_package
>             from numpy.distutils.core import setup
>           File "/usr/lib/python2.4/site-packages/numpy/__init__.py", line 39, in ?
>             import core
>           File "/usr/lib/python2.4/site-packages/numpy/core/__init__.py", line 5,
> in ?
>             import multiarray
>         ImportError: /usr/lib/python2.4/site-packages/numpy/core/multiarray.so:
> undefined symbol:       PyUnicodeUCS2_FromUnicode
>
> I can't find  anything via google to indicate what's the cause...
>
> Any thoughts/comments would be seriously helpful!!

This could be a result of your numpy installation being incomplete
(likely do to not being correctly linked to blas/lapack). What happens
when you try:

python -c "import numpy"

on its own? Does it fail with the same error? If so, you need to focus
on numpy. One subtlety to be aware of is that you need to remove the
(Continue reading)

LB | 1 Nov 15:27
Picon

Bug in scipy.integrate.odeint ?

Hi,

I find the behaviour of scipy.integrate.odeint very strange :
>>> from numpy import *
>>> from scipy import integrate
>>>
>>> def f(x, t):
...        return cos(x)
...
>>>
>>> X0 = array([0.0])
>>> X0_ini = X0.copy()
>>> t = linspace(0, 20., 200)
>>> X = integrate.odeint(f, X0, t)
>>> X0 == X0_ini
array([False], dtype=bool)
>>> X0 == X[-1]
array([True], dtype=bool)

Why do odeint modify X0 ?
Is there any reason for this ?
For me, it seems really like a bug and could easily lead to bugs if
there's no mention of this in the doc string.

--
LB
David M. Cooke | 1 Nov 15:56
Picon
Picon

Re: Bug in scipy.integrate.odeint ?

On Nov 1, 2007, at 10:27 , LB wrote:

> Hi,
>
> I find the behaviour of scipy.integrate.odeint very strange :
>>>> from numpy import *
>>>> from scipy import integrate
>>>>
>>>> def f(x, t):
> ...        return cos(x)
> ...
>>>>
>>>> X0 = array([0.0])
>>>> X0_ini = X0.copy()
>>>> t = linspace(0, 20., 200)
>>>> X = integrate.odeint(f, X0, t)
>>>> X0 == X0_ini
> array([False], dtype=bool)
>>>> X0 == X[-1]
> array([True], dtype=bool)
>
> Why do odeint modify X0 ?
> Is there any reason for this ?
> For me, it seems really like a bug and could easily lead to bugs if
> there's no mention of this in the doc string.

I'm guessing you've got an old version of scipy installed, as it was  
changed in February to use a copy of the input arguments instead.

--

-- 
(Continue reading)

Bradford Cross | 1 Nov 18:29
Picon
Gravatar

Installing TimeSeries

Install works OK for MAskedArray but fails for TimeSeries with following output:

bcross <at> ubuntu:~/maskedarray$ sudo python setup.py install
Password:
running install
running build
running config_fc
running build_py
running install_lib
running install_data
running install_egg_info
Removing /usr/lib/python2.5/site-packages/maskedarray-0.0.0.egg-info
Writing /usr/lib/python2.5/site-packages/maskedarray-0.0.0.egg-info
bcross <at> ubuntu:~/maskedarray$ cd
bcross <at> ubuntu:~$ cd timeseries/
bcross <at> ubuntu:~/timeseries$ sudo python setup.py install
Warning: Assuming default configuration (./lib/{setup_lib,setup}.py was not found)
Appending timeseries.lib configuration to timeseries
Ignoring attempt to set 'name' (from 'timeseries' to 'timeseries.lib')
Warning: Assuming default configuration (./tests/{setup_tests,setup}.py was not found)
Appending timeseries.tests configuration to timeseries
Ignoring attempt to set 'name' (from 'timeseries' to 'timeseries.tests')
running install
running build
running config_fc
running build_src
building extension "timeseries.cseries" sources
running build_py
running build_ext
customize UnixCCompiler
customize UnixCCompiler using build_ext
building 'timeseries.cseries' extension
compiling C sources
C compiler: gcc -pthread -fno-strict-aliasing -DNDEBUG -g -O2 -Wall -Wstrict-prototypes -fPIC

compile options: '-I/usr/lib/python2.5/site-packages/numpy/core/include/numpy -I./include -I/usr/lib/python2.5/site-packages/numpy/core/include -I/usr/include/python2.5 -c'
gcc: ./src/cseries.c
In file included from ./src/cseries.c:1:
./include/c_lib.h:4:20: error: Python.h: No such file or directory
./include/c_lib.h:5:26: error: structmember.h: No such file or directory
In file included from /usr/lib/python2.5/site-packages/numpy/core/include/numpy/arrayobject.h:14,
                 from ./include/c_lib.h:6,
                 from ./src/cseries.c:1:
/usr/lib/python2.5/site-packages/numpy/core/include/numpy/ndarrayobject.h:91:2: error: #error Must use Python with unicode enabled.
In file included from /usr/lib/python2.5/site-packages/numpy/core/include/numpy/arrayobject.h:14,
                 from ./include/c_lib.h:6,
                 from ./src/cseries.c:1:
/usr/lib/python2.5/site-packages/numpy/core/include/numpy/ndarrayobject.h:918: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'npy_intp'
/usr/lib/python2.5/site-packages/numpy/core/include/numpy/ndarrayobject.h:919: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'npy_uintp'
/usr/lib/python2.5/site-packages/numpy/core/include/numpy/ndarrayobject.h:1009: error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token
/usr/lib/python2.5/site-packages/numpy/core/include/numpy/ndarrayobject.h:1010: error: expected ')' before '*' token
/usr/lib/python2.5/site-packages/numpy/core/include/numpy/ndarrayobject.h:1012: error: expected declaration specifiers or '...' before 'npy_intp'
/usr/lib/python2.5/site-packages/numpy/core/include/numpy/ndarrayobject.h:1012: error: expected declaration specifiers or '...' before 'npy_intp'
/usr/lib/python2.5/site-packages/numpy/core/include/numpy/ndarrayobject.h:1013: error: expected declaration specifiers or '...' before 'npy_intp'
/usr/lib/python2.5/site-packages/numpy/core/include/numpy/ndarrayobject.h:1023: error: expected declaration specifiers or '...' before 'npy_intp'
/usr/lib/python2.5/site-packages/numpy/core/include/numpy/ndarrayobject.h:1023: error: expected declaration specifiers or '...' before 'npy_intp'
/usr/lib/python2.5/site-packages/numpy/core/include/numpy/ndarrayobject.h:1025: error: expected declaration specifiers or '...' before 'npy_intp'
/usr/lib/python2.5/site-packages/numpy/core/include/numpy/ndarrayobject.h:1025: error: expected declaration specifiers or '...' before 'npy_intp'
/usr/lib/python2.5/site-packages/numpy/core/include/numpy/ndarrayobject.h:1026: error: expected declaration specifiers or '...' before 'npy_intp'
/usr/lib/python2.5/site-packages/numpy/core/include/numpy/ndarrayobject.h:1028: error: expected declaration specifiers or '...' before 'npy_intp'
/usr/lib/python2.5/site-packages/numpy/core/include/numpy/ndarrayobject.h:1031: error: expected ')' before '*' token
/usr/lib/python2.5/site-packages/numpy/core/include/numpy/ndarrayobject.h:1034: error: expected declaration specifiers or '...' before 'npy_intp'
/usr/lib/python2.5/site-packages/numpy/core/include/numpy/ndarrayobject.h:1036: error: expected declaration specifiers or '...' before 'npy_intp'
/usr/lib/python2.5/site-packages/numpy/core/include/numpy/ndarrayobject.h:1037: error: expected declaration specifiers or '...' before 'npy_intp'
/usr/lib/python2.5/site-packages/numpy/core/include/numpy/ndarrayobject.h:1037: error: expected declaration specifiers or '...' before 'npy_intp'
/usr/lib/python2.5/site-packages/numpy/core/include/numpy/ndarrayobject.h:1039: error: expected declaration specifiers or '...' before 'npy_intp'
/usr/lib/python2.5/site-packages/numpy/core/include/numpy/ndarrayobject.h:1044: error: expected specifier-qualifier-list before 'npy_intp'
/usr/lib/python2.5/site-packages/numpy/core/include/numpy/ndarrayobject.h:1057: error: expected specifier-qualifier-list before 'PyArray_GetItemFunc'
/usr/lib/python2.5/site-packages/numpy/core/include/numpy/ndarrayobject.h:1159: error: expected specifier-qualifier-list before 'PyObject_HEAD'
/usr/lib/python2.5/site-packages/numpy/core/include/numpy/ndarrayobject.h:1191: error: expected specifier-qualifier-list before 'PyObject'
/usr/lib/python2.5/site-packages/numpy/core/include/numpy/ndarrayobject.h:1201: error: expected specifier-qualifier-list before 'PyObject_HEAD'
/usr/lib/python2.5/site-packages/numpy/core/include/numpy/ndarrayobject.h:1227: error: expected specifier-qualifier-list before 'PyObject_HEAD'
/usr/lib/python2.5/site-packages/numpy/core/include/numpy/ndarrayobject.h:1234: error: expected declaration specifiers or '...' before 'PyObject'
/usr/lib/python2.5/site-packages/numpy/core/include/numpy/ndarrayobject.h:1367: error: expected specifier-qualifier-list before 'PyObject_HEAD'
/usr/lib/python2.5/site-packages/numpy/core/include/numpy/ndarrayobject.h:1505: error: expected specifier-qualifier-list before 'PyObject_HEAD'
/usr/lib/python2.5/site-packages/numpy/core/include/numpy/ndarrayobject.h:1562: error: expected specifier-qualifier-list before 'PyObject_HEAD'
/usr/lib/python2.5/site-packages/numpy/core/include/numpy/ndarrayobject.h:1762: error: expected specifier-qualifier-list before 'npy_intp'
In file included from /usr/lib/python2.5/site-packages/numpy/core/include/numpy/ndarrayobject.h:1777,
                 from /usr/lib/python2.5/site-packages/numpy/core/include/numpy/arrayobject.h:14,
                 from ./include/c_lib.h:6,
                 from ./src/cseries.c:1:
/usr/lib/python2.5/site-packages/numpy/core/include/numpy/__multiarray_api.h:397: error: 'NULL' undeclared here (not in a function)
/usr/lib/python2.5/site-packages/numpy/core/include/numpy/__multiarray_api.h: In function '_import_array':
/usr/lib/python2.5/site-packages/numpy/core/include/numpy/__multiarray_api.h:945: error: 'PyObject' undeclared (first use in this function)
/usr/lib/python2.5/site-packages/numpy/core/include/numpy/__multiarray_api.h:945: error: (Each undeclared identifier is reported only once
/usr/lib/python2.5/site-packages/numpy/core/include/numpy/__multiarray_api.h:945: error: for each function it appears in.)
/usr/lib/python2.5/site-packages/numpy/core/include/numpy/__multiarray_api.h:945: error: 'numpy' undeclared (first use in this function)
/usr/lib/python2.5/site-packages/numpy/core/include/numpy/__multiarray_api.h:945: warning: implicit declaration of function 'PyImport_ImportModule'
/usr/lib/python2.5/site-packages/numpy/core/include/numpy/__multiarray_api.h:946: error: 'c_api' undeclared (first use in this function)
/usr/lib/python2.5/site-packages/numpy/core/include/numpy/__multiarray_api.h:948: warning: implicit declaration of function 'PyObject_GetAttrString'
/usr/lib/python2.5/site-packages/numpy/core/include/numpy/__multiarray_api.h:949: warning: implicit declaration of function 'Py_DECREF'
/usr/lib/python2.5/site-packages/numpy/core/include/numpy/__multiarray_api.h:950: warning: implicit declaration of function 'PyCObject_Check'
/usr/lib/python2.5/site-packages/numpy/core/include/numpy/__multiarray_api.h:951: warning: implicit declaration of function 'PyCObject_AsVoidPtr'
/usr/lib/python2.5/site-packages/numpy/core/include/numpy/__multiarray_api.h:958: warning: implicit declaration of function 'PyErr_Format'
/usr/lib/python2.5/site-packages/numpy/core/include/numpy/__multiarray_api.h:958: error: 'PyExc_RuntimeError' undeclared (first use in this function)
In file included from ./src/cseries.c:1:
./include/c_lib.h: At top level:
./include/c_lib.h:19: error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token
./include/c_lib.h:20: error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token
./include/c_lib.h:21: error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token
./include/c_lib.h:22: error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token
./include/c_lib.h:23: error: expected ')' before '*' token
./include/c_lib.h:24: error: expected ')' before '*' token
./include/c_lib.h:26: error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token
./include/c_lib.h:28: error: expected ')' before '*' token
In file included from ./src/cseries.c:2:
./include/c_dates.h:103: error: expected ')' before '*' token
./include/c_dates.h:109: error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token
./include/c_dates.h:110: error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token
./include/c_dates.h:113: error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token
./include/c_dates.h:114: error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token
./include/c_dates.h:115: error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token
./include/c_dates.h:116: error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token
./include/c_dates.h:118: error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token
./include/c_dates.h:119: error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token
./include/c_dates.h:121: error: expected ')' before '*' token
In file included from ./src/cseries.c:3:
./include/c_tseries.h:6: error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token
./include/c_tseries.h:8: error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token
./include/c_tseries.h:9: error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token
./include/c_tseries.h:10: error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token
./include/c_tseries.h:11: error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token
./include/c_tseries.h:13: error: expected ')' before '*' token
./src/cseries.c:5: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'cseries_methods'
./src/cseries.c:55: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'initcseries'
In file included from ./src/cseries.c:1:
./include/c_lib.h:4:20: error: Python.h: No such file or directory
./include/c_lib.h:5:26: error: structmember.h: No such file or directory
In file included from /usr/lib/python2.5/site-packages/numpy/core/include/numpy/arrayobject.h:14,
                 from ./include/c_lib.h:6,
                 from ./src/cseries.c:1:
/usr/lib/python2.5/site-packages/numpy/core/include/numpy/ndarrayobject.h:91:2: error: #error Must use Python with unicode enabled.
In file included from /usr/lib/python2.5/site-packages/numpy/core/include/numpy/arrayobject.h:14,
                 from ./include/c_lib.h:6,
                 from ./src/cseries.c:1:
/usr/lib/python2.5/site-packages/numpy/core/include/numpy/ndarrayobject.h:918: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'npy_intp'
/usr/lib/python2.5/site-packages/numpy/core/include/numpy/ndarrayobject.h:919: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'npy_uintp'
/usr/lib/python2.5/site-packages/numpy/core/include/numpy/ndarrayobject.h:1009: error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token
/usr/lib/python2.5/site-packages/numpy/core/include/numpy/ndarrayobject.h:1010: error: expected ')' before '*' token
/usr/lib/python2.5/site-packages/numpy/core/include/numpy/ndarrayobject.h:1012: error: expected declaration specifiers or '...' before 'npy_intp'
/usr/lib/python2.5/site-packages/numpy/core/include/numpy/ndarrayobject.h:1012: error: expected declaration specifiers or '...' before 'npy_intp'
/usr/lib/python2.5/site-packages/numpy/core/include/numpy/ndarrayobject.h:1013: error: expected declaration specifiers or '...' before 'npy_intp'
/usr/lib/python2.5/site-packages/numpy/core/include/numpy/ndarrayobject.h:1023: error: expected declaration specifiers or '...' before 'npy_intp'
/usr/lib/python2.5/site-packages/numpy/core/include/numpy/ndarrayobject.h:1023: error: expected declaration specifiers or '...' before 'npy_intp'
/usr/lib/python2.5/site-packages/numpy/core/include/numpy/ndarrayobject.h:1025: error: expected declaration specifiers or '...' before 'npy_intp'
/usr/lib/python2.5/site-packages/numpy/core/include/numpy/ndarrayobject.h:1025: error: expected declaration specifiers or '...' before 'npy_intp'
/usr/lib/python2.5/site-packages/numpy/core/include/numpy/ndarrayobject.h:1026: error: expected declaration specifiers or '...' before 'npy_intp'
/usr/lib/python2.5/site-packages/numpy/core/include/numpy/ndarrayobject.h:1028: error: expected declaration specifiers or '...' before 'npy_intp'
/usr/lib/python2.5/site-packages/numpy/core/include/numpy/ndarrayobject.h:1031: error: expected ')' before '*' token
/usr/lib/python2.5/site-packages/numpy/core/include/numpy/ndarrayobject.h:1034: error: expected declaration specifiers or '...' before 'npy_intp'
/usr/lib/python2.5/site-packages/numpy/core/include/numpy/ndarrayobject.h:1036: error: expected declaration specifiers or '...' before 'npy_intp'
/usr/lib/python2.5/site-packages/numpy/core/include/numpy/ndarrayobject.h:1037: error: expected declaration specifiers or '...' before 'npy_intp'
/usr/lib/python2.5/site-packages/numpy/core/include/numpy/ndarrayobject.h:1037: error: expected declaration specifiers or '...' before 'npy_intp'
/usr/lib/python2.5/site-packages/numpy/core/include/numpy/ndarrayobject.h:1039: error: expected declaration specifiers or '...' before 'npy_intp'
/usr/lib/python2.5/site-packages/numpy/core/include/numpy/ndarrayobject.h:1044: error: expected specifier-qualifier-list before 'npy_intp'
/usr/lib/python2.5/site-packages/numpy/core/include/numpy/ndarrayobject.h:1057: error: expected specifier-qualifier-list before 'PyArray_GetItemFunc'
/usr/lib/python2.5/site-packages/numpy/core/include/numpy/ndarrayobject.h:1159: error: expected specifier-qualifier-list before 'PyObject_HEAD'
/usr/lib/python2.5/site-packages/numpy/core/include/numpy/ndarrayobject.h:1191: error: expected specifier-qualifier-list before 'PyObject'
/usr/lib/python2.5/site-packages/numpy/core/include/numpy/ndarrayobject.h:1201: error: expected specifier-qualifier-list before 'PyObject_HEAD'
/usr/lib/python2.5/site-packages/numpy/core/include/numpy/ndarrayobject.h:1227: error: expected specifier-qualifier-list before 'PyObject_HEAD'
/usr/lib/python2.5/site-packages/numpy/core/include/numpy/ndarrayobject.h:1234: error: expected declaration specifiers or '...' before 'PyObject'
/usr/lib/python2.5/site-packages/numpy/core/include/numpy/ndarrayobject.h:1367: error: expected specifier-qualifier-list before 'PyObject_HEAD'
/usr/lib/python2.5/site-packages/numpy/core/include/numpy/ndarrayobject.h:1505: error: expected specifier-qualifier-list before 'PyObject_HEAD'
/usr/lib/python2.5/site-packages/numpy/core/include/numpy/ndarrayobject.h:1562: error: expected specifier-qualifier-list before 'PyObject_HEAD'
/usr/lib/python2.5/site-packages/numpy/core/include/numpy/ndarrayobject.h:1762: error: expected specifier-qualifier-list before 'npy_intp'
In file included from /usr/lib/python2.5/site-packages/numpy/core/include/numpy/ndarrayobject.h:1777,
                 from /usr/lib/python2.5/site-packages/numpy/core/include/numpy/arrayobject.h:14,
                 from ./include/c_lib.h:6,
                 from ./src/cseries.c:1:
/usr/lib/python2.5/site-packages/numpy/core/include/numpy/__multiarray_api.h:397: error: 'NULL' undeclared here (not in a function)
/usr/lib/python2.5/site-packages/numpy/core/include/numpy/__multiarray_api.h: In function '_import_array':
/usr/lib/python2.5/site-packages/numpy/core/include/numpy/__multiarray_api.h:945: error: 'PyObject' undeclared (first use in this function)
/usr/lib/python2.5/site-packages/numpy/core/include/numpy/__multiarray_api.h:945: error: (Each undeclared identifier is reported only once
/usr/lib/python2.5/site-packages/numpy/core/include/numpy/__multiarray_api.h:945: error: for each function it appears in.)
/usr/lib/python2.5/site-packages/numpy/core/include/numpy/__multiarray_api.h:945: error: 'numpy' undeclared (first use in this function)
/usr/lib/python2.5/site-packages/numpy/core/include/numpy/__multiarray_api.h:945: warning: implicit declaration of function 'PyImport_ImportModule'
/usr/lib/python2.5/site-packages/numpy/core/include/numpy/__multiarray_api.h:946: error: 'c_api' undeclared (first use in this function)
/usr/lib/python2.5/site-packages/numpy/core/include/numpy/__multiarray_api.h:948: warning: implicit declaration of function 'PyObject_GetAttrString'
/usr/lib/python2.5/site-packages/numpy/core/include/numpy/__multiarray_api.h:949: warning: implicit declaration of function 'Py_DECREF'
/usr/lib/python2.5/site-packages/numpy/core/include/numpy/__multiarray_api.h:950: warning: implicit declaration of function 'PyCObject_Check'
/usr/lib/python2.5/site-packages/numpy/core/include/numpy/__multiarray_api.h:951: warning: implicit declaration of function 'PyCObject_AsVoidPtr'
/usr/lib/python2.5/site-packages/numpy/core/include/numpy/__multiarray_api.h:958: warning: implicit declaration of function 'PyErr_Format'
/usr/lib/python2.5/site-packages/numpy/core/include/numpy/__multiarray_api.h:958: error: 'PyExc_RuntimeError' undeclared (first use in this function)
In file included from ./src/cseries.c:1:
./include/c_lib.h: At top level:
./include/c_lib.h:19: error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token
./include/c_lib.h:20: error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token
./include/c_lib.h:21: error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token
./include/c_lib.h:22: error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token
./include/c_lib.h:23: error: expected ')' before '*' token
./include/c_lib.h:24: error: expected ')' before '*' token
./include/c_lib.h:26: error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token
./include/c_lib.h:28: error: expected ')' before '*' token
In file included from ./src/cseries.c:2:
./include/c_dates.h:103: error: expected ')' before '*' token
./include/c_dates.h:109: error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token
./include/c_dates.h:110: error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token
./include/c_dates.h:113: error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token
./include/c_dates.h:114: error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token
./include/c_dates.h:115: error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token
./include/c_dates.h:116: error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token
./include/c_dates.h:118: error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token
./include/c_dates.h:119: error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token
./include/c_dates.h:121: error: expected ')' before '*' token
In file included from ./src/cseries.c:3:
./include/c_tseries.h:6: error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token
./include/c_tseries.h:8: error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token
./include/c_tseries.h:9: error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token
./include/c_tseries.h:10: error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token
./include/c_tseries.h:11: error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token
./include/c_tseries.h:13: error: expected ')' before '*' token
./src/cseries.c:5: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'cseries_methods'
./src/cseries.c:55: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'initcseries'
error: Command "gcc -pthread -fno-strict-aliasing -DNDEBUG -g -O2 -Wall -Wstrict-prototypes -fPIC -I/usr/lib/python2.5/site-packages/numpy/core/include/numpy -I./include -I/usr/lib/python2.5/site-packages/numpy/core/include -I/usr/include/python2.5 -c ./src/cseries.c -o build/temp.linux- i686-2.5/src/cseries.o" failed with exit status 1

_______________________________________________
SciPy-user mailing list
SciPy-user <at> scipy.org
http://projects.scipy.org/mailman/listinfo/scipy-user
Olivier | 1 Nov 19:06
Picon

Re: Bug in scipy.sparse

Nobody seems to care much about sparse arrays in scipy.... One reason
why i tremendously prefer arrays over matrices is that it is extremely
easy to multiply all the rows or columns of a matrix by a vector of
coefficients. You just do M*V to multiply column-wise or
M*V.reshape(-1,1) to multiply row-wise.

I hate having to create a diagonal matrix for such a simple task.

Nobody is interested in having sparse arrays in scipy?

== Olivier

On Oct 31, 12:01 pm, "Olivier Verdier" <zelb...@gmail.com> wrote:
> The first thing I'm surprised about with scipy.sparse is that it uses the
> matrix type instead of the array type. This is very unfortunate, in my
> opinion.
> The bug is that a sparse matrix won't work correctly with `dot` and `array`:
>
> spmat = speye(3,3)
> vec  = array([1,0,0])
>
> dot(spmat, vec)
> returns:
> array([  (0, 0) 1.0
>   (1, 1)        1.0
>   (2, 2)        1.0,
>          (0, 0) 0.0
>   (1, 1)        0.0
>   (2, 2)        0.0,
>          (0, 0) 0.0
>   (1, 1)        0.0
>   (2, 2)        0.0], dtype=object)
>
> Ouch!!
>
> The right result may however be obtained with spmat * vec.
>
> This is a pity because any code that works with arrays or matrices in
> general and uses `dot` to do the matrix vector multiplication will be
> *broken* with sparse matrices.
>
> How reliable is scipy.sparse? Is there any plan to make it more compatible
> with the array type? Behave like the array type? How can I help?
>
> == Olivier
>
> _______________________________________________
> SciPy-user mailing list
> SciPy-u...@scipy.orghttp://projects.scipy.org/mailman/listinfo/scipy-user
Stef Mientki | 1 Nov 19:16
Picon
Favicon
Gravatar

Re: Scipy + Vision = LabView ?


Matthieu Brucher wrote:
>
>
> 2007/10/31, Paul Barrett <pebarrett <at> gmail.com 
> <mailto:pebarrett <at> gmail.com>>:
>
>     No, you are not dreaming.  I also commented on this possibility
>     several years ago to some people in the SciPy community.
>     Unfortunately, I have not had the time or motivation to act on it.  It
>     would certainly be nice to have a basic package to show people.
>     You'll need to create a set of APIs so that you can connect to
>     instrumentation.  It shouldn't be too hard now that the interfaces
>     have been standardized.
>
>
> Sorry, it was in fact Vision and Viper I saw in the past as well.
Where can I find Viper ?
Google hates those common names ;-)
> The idea is great but the application, IMHO, is not quite optimal :
> - even for the tutorial, the rotate bloc should have two inputs, the 
> image and the rotation angle (this last factor could be given by the 
> result of another algorithm)
maybe 3, also one for the interpolation method ?
I would also make the major controls (for models with not too many 
controls),
in this case the rotation angle directly available with a small slider 
on the visual component.
> - what about multithreading in this model ?
> - what about flow control ? (which is really a huge issue that is 
> lacking in ITK for instance)
> - is there a way to create a bunch of blocks easily ?
>
Does LabView supports these ?
> All this has consequences on the interface. Besides, it would be very 
> great to use Traits as input and output blocks.
I Don't know Traits, so can't judge that.

cheers,
Stef
Jarrod Millman | 1 Nov 19:19
Picon
Favicon
Gravatar

Re: Scipy + Vision = LabView ?

On Nov 1, 2007 11:16 AM, Stef Mientki <s.mientki <at> ru.nl> wrote:
> Where can I find Viper ?

http://www.scripps.edu/~sanner/python/viper/index.html

--

-- 
Jarrod Millman
Computational Infrastructure for Research Labs
10 Giannini Hall, UC Berkeley
phone: 510.643.4014
http://cirl.berkeley.edu/

Gmane