> By the way, you seem puzzled by the behaviour of column_stack. I think
> it fits well with the docstring.
What was unexpected to me was its behavior when handling inputs that
are not 1-d. The docstring doesn't say what will happen in that case.
But my expectation is that it should associate. I.e.:
column_stack(( a,b,c ))
should be the same as:
column_stack(( column_stack(( a,b )),c ))
But it's not. column_stack((a,b,c)) is the same as:
column_stack(( column_stack(( a,b )).transpose() ,c ))
--bb

Hi,
I downloaded the numpy-1.0b1.win32-py2.4.exe. After run this file, I tried to run the command, python setup.py install, to intall the numpy. But I got the following error message,
C:\Python24\Lib\site-packages\numpy>python setup.py install
Warning: Assuming default configuration (distutils\command/{setup_command,setup}
.py was not found)
Appending numpy.distutils.command configuration to numpy.distutils
Ignoring attempt to set 'name' (from 'numpy.distutils' to 'numpy.distutils.comma
nd')
Warning: Assuming default configuration (distutils\fcompiler/{setup_fcompiler,se
tup}.py was not found)
Appending numpy.distutils.fcompiler configuration to numpy.distutils
Ignoring attempt to set 'name' (from 'numpy.distutils' to 'numpy.distutils.fcomp
iler')
non-existing path in 'distutils': 'site.cfg'
Appending numpy.distutils configuration to numpy
Ignoring attempt to set 'name' (from 'numpy' to 'numpy.distutils')
Appending numpy.testing configuration to numpy
Ignoring attempt to set 'name' (from 'numpy' to 'numpy.testing')
F2PY Version 2_2879
Appending numpy.f2py configuration to numpy
Ignoring attempt to set 'name' (from 'numpy' to 'numpy.f2py')
Ignoring attempt to set 'version' (from None to '2_2879')
Traceback (most recent call last):
File "setup.py", line 28, in ?
setup(configuration=configuration)
File "C:\Python24\Lib\site-packages\numpy\distutils\core.py", line 144, in set
up
config = configuration()
File "setup.py", line 9, in configuration
config.add_subpackage('core')
File "C:\Python24\Lib\site-packages\numpy\distutils\misc_util.py", line 740, i
n add_subpackage
caller_level = 2)
File "C:\Python24\Lib\site-packages\numpy\distutils\misc_util.py", line 723, i
n get_subpackage
caller_level = caller_level + 1)
File "C:\Python24\Lib\site-packages\numpy\distutils\misc_util.py", line 670, i
n _get_configuration_from_setup_py
config = setup_module.configuration(*args)
File "C:\Python24\Lib\site-packages\numpy\core\setup.py", line 20, in configur
ation
open(generate_umath_py,'U'),generate_umath_py,
IOError: [Errno 2] No such file or directory: 'core\\code_generators\\generate_u
math.py'
Can anyone tell me how to fix this error and install the numpy?
I am using Windows XP Home edition and Python 2.4.
Thanks
Frank
---------------------------------
Do you Yahoo!?
Everyone is raving about the all-new Yahoo! Mail Beta.

I rewrote some python code using numpy to do a performance comparison.
The results were the opposite of what I wanted. Numpy was slower
than Python without numpy. Is there something wrong with my approach?
# mean of n values within an array
import numpy, time
def nmean(list,n):
a = []
for i in range(1,len(list)+1):
start = i-n
divisor = n
if start < 0:
start = 0
divisor = i
a.append(sum(list[start:i])/divisor)
return a
t = [1.0*i for i in range(1400)]
start = time.clock()
for x in range(100):
nmean(t,50)
print "regular python took: %f sec."%(time.clock() - start)
def numpy_nmean(list,n):
a = numpy.empty(len(list),dtype=float)
for i in range(1,len(list)+1):
start = i-n
if start < 0:
start = 0
a[i-1] = list[start:i].mean(0)
return a
t = numpy.arange(0,1400,dtype=float)
start = time.clock()
for x in range(100):
numpy_nmean(t,50)
print "numpy took: %f sec."%(time.clock() - start)
Results:
regular python took: 1.215274 sec.
numpy took: 2.499299 sec.

Dear all,
I had a working C extension, but after upgrading to a recent numpy
from SVN, I can no longer compile it. I've fixed the deprecation
warnings, but can't get past this:
frgetvect.c:51: error: 'intp' undeclared (first use in this function)
Now, I'm quite confused since I thought that intp should be a global
thing, not numpy related, and I believe I'm using the shipped Apple
gcc version.
Version info:
nvf@whitedwarf:~/temp/v6r20/pyfrgetvect$ python -V
Python 2.4.1
nvf@whitedwarf:~/temp/v6r20/pyfrgetvect$ python -c "import numpy;
print numpy.__version__"
1.1.2881
nvf@whitedwarf:~/temp/v6r20/pyfrgetvect$ gcc --version
powerpc-apple-darwin8-gcc-4.0.0 (GCC) 4.0.0 20041026 (Apple Computer,
Inc. build 4061)
Can anyone help me?
Thanks,
Nick
Full build output:
nvf@whitedwarf:~/temp/v6r20/pyfrgetvect$ python setup.py build
running build
running build_ext
building 'frgetvect' extension
C compiler: gcc -fno-strict-aliasing -Wno-long-double -no-cpp-precomp
-mno-fused-madd -fno-common -dynamic -DNDEBUG -g -O3 -Wall -Wstrict-
prototypes
creating build
creating build/temp.darwin-8.7.0-Power_Macintosh-2.4
compile options: '-DMAJOR_VERSION=0 -DMINOR_VERSION=2 -I../src -I/
Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-
packages/numpy/core/include -I/Library/Frameworks/Python.framework/
Versions/2.4/include/python2.4 -c'
extra options: '-w'
gcc: frgetvect.c
frgetvect.c: In function 'frgetvect':
frgetvect.c:51: error: 'intp' undeclared (first use in this function)
frgetvect.c:51: error: (Each undeclared identifier is reported only once
frgetvect.c:51: error: for each function it appears in.)
frgetvect.c:51: error: parse error before "shape"
frgetvect.c:138: error: 'shape' undeclared (first use in this function)
frgetvect.c:138: error: parse error before "nData"
frgetvect.c: In function 'frgetvect':
frgetvect.c:51: error: 'intp' undeclared (first use in this function)
frgetvect.c:51: error: (Each undeclared identifier is reported only once
frgetvect.c:51: error: for each function it appears in.)
frgetvect.c:51: error: parse error before "shape"
frgetvect.c:138: error: 'shape' undeclared (first use in this function)
frgetvect.c:138: error: parse error before "nData"
error: Command "gcc -fno-strict-aliasing -Wno-long-double -no-cpp-
precomp -mno-fused-madd -fno-common -dynamic -DNDEBUG -g -O3 -Wall -
Wstrict-prototypes -DMAJOR_VERSION=0 -DMINOR_VERSION=2 -I../src -I/
Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-
packages/numpy/core/include -I/Library/Frameworks/Python.framework/
Versions/2.4/include/python2.4 -c frgetvect.c -o build/
temp.darwin-8.7.0-Power_Macintosh-2.4/frgetvect.o -w" failed with
exit status 1

Hello,
I tried different arcsin functions on a "complex" number (z=0.52+0j) and obtained
the following results:
cmath.asin(z) gives (0.54685095069594414+0j) #okay
-1j*log(1j*z+sqrt(1-z**2)) gives (0.54685095069594414+0j) #okay, by definition
numarray.arcsin(z) gives (0.54685095069594414+0j) #still okay
but
numpy.arcsin(z) gives (0.54685095069594414+0.54685095069594414j) #bug??
Is it a bug in numpy, or is there another explanation?
Thanks
Daniel Poitras
Ottawa

It seems that object arrays will not pickle if they have a nan when
the pickle protocol is set to binary. From what I can tell the object
array simply delegates to python (which makes sense) which in turn
cannot pickle nans in binary format. It is unfortunate because it is
very useful to have heterogenous arrays that include nans. What do
other people do in this situation? Does anyone know why python has
this limitation? Is there an intelligent workaround other than search
and replace? Would it be worth it to put an intelligent workaround
into numpy so it is transparent to the user? I was wondering what
people thought.
Code that reproduces the problem:
This is regular python:
pickle.dumps(numpy.nan, 2)
SystemError: frexp() result out of range
This is fine in numpy:
pickle.dumps(numpy.array([numpy.nan]), 2)
This breaks:
pickle.dumps(numpy.array([numpy.nan], numpy.PyObject), 2)
SystemError: frexp() result out of range
--Tom

PS: Sorry, I should've mentioned it's 1.0b2.dev2915 that I'm using,
not 1.0b1.
-Tom
-------------------------------------------------
This mail sent through IMP: http://horde.org/imp/

Hello,
I have a program using Numeric and weave developed with Python2.3. I
just switched to Python2.4 and numpy. The Numeric/weave version is
almost a factor of 2 faster compared to numpy/weave. Is that what is to
be expected or are there options to improve the speed of numpy/weave? I
would be very appreciative for any help. Please find the source attached.
Regards
Rolf
--
------------------------------------
# Dr. Rolf Wester
# Fraunhofer Institut f. Lasertechnik
# Steinbachstrasse 15, D-52074 Aachen, Germany.
# Tel: + 49 (0) 241 8906 401, Fax: +49 (0) 241 8906 121
# EMail: rolf.wester(a)ilt.fraunhofer.de
# WWW: http://www.ilt.fraunhofer.de