Re: [Numpy-discussion] [RFC] complex functions in npymath

2009-10-30 Thread Jörgen Stenarson
David Cournapeau skrev:
> The missing piece in complex support in npymath is mostly tests: I have
> tests for all the special cases (all special cases specified in C99
> standard are tested), but no test for the actual 'normal' values. If you
> (or someone else) could add a couple of tests, that would be great.
> 

In ticket #1271 I reported on some edgecase errors for pow with negative 
exponents which would be great to include in the test suite as well.

/Jörgen
___
NumPy-Discussion mailing list
NumPy-Discussion@scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion


[Numpy-discussion] Complex zerodivision/negative powers not handled correctly

2009-12-08 Thread Jörgen Stenarson
Hi,

I have observed a problem with complex zerodivision and negative powers.
With a complex zero the result is either zero or NaN NaNj, the first one 
is clearly wrong and the other one I don't know what is most reasonable 
some kind of inf or a Nan.

This problem has been reported in the tracker as #1271.

In [1]: import numpy

In [2]: numpy.__version__
Out[2]: '1.4.0rc1'

In [3]: from numpy import *

In [4]: array([-0., 0])**-1
Out[4]: array([-Inf,  Inf])

In [5]: array([-0., 0])**-2
Out[5]: array([ Inf,  Inf])

In [6]: array([-0.-0j, -0.+0j, 0-0j, 0+0j])**-2
Out[6]: array([ 0.+0.j,  0.+0.j,  0.+0.j,  0.+0.j])

In [7]: array([-0.-0j, -0.+0j, 0-0j, 0+0j])**-1
Out[7]: array([ NaN NaNj,  NaN NaNj,  NaN NaNj,  NaN NaNj])

In [8]: 1/array([-0.-0j, -0.+0j, 0-0j, 0+0j])
Out[8]: array([ NaN NaNj,  NaN NaNj,  NaN NaNj,  NaN NaNj])
___
NumPy-Discussion mailing list
NumPy-Discussion@scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion


Re: [Numpy-discussion] numpy and python 2.6 on windows: please test

2008-11-17 Thread Jörgen Stenarson
Hi,

this is really good news, thanks for working on this. I'm looking 
forward to switching from 2.4 to 2.6 at work but we really need numpy 
and matplotlib.

I have successfully built numpy on windows using mingw.
Some basic tests at the interactive prompt suggests it works.

/Jörgen



David Cournapeau skrev:
> Hi,
> 
> I think I finally solve most serious issues for numpy on python 2.6
> on windows. I would appreciate if people would test building numpy
> (trunk); in particular since some issues are moderately complex and
> system dependent, I am interested in the following configurations:
> - python installed for a single user (that is is installed as non
> admin), particularly on VISTA, build with mingw
> - mingw builds on XP and VISTA with python installed globally (e.g.
> in C:\Python26).
> 
> Builds with VS 2008 are less interesting for me (e.g. it should work).
> The actual test suite results are not that interesting either at this
> point (I see 3 failures and one error ATM on XP). Basically, if you can
> build and import numpy at all, it is good :)
> 
> thanks,
> 
> David
>
> ___
> Numpy-discussion mailing list
> Numpy-discussion@scipy.org
> http://projects.scipy.org/mailman/listinfo/numpy-discussion
> 

___
Numpy-discussion mailing list
Numpy-discussion@scipy.org
http://projects.scipy.org/mailman/listinfo/numpy-discussion


[Numpy-discussion] Compilation failure on python2.4 win32

2007-09-16 Thread Jörgen Stenarson
Hi,

I cannot compile numpy (rev 2042) for python2.4 on win32, it works on 
python2.5. It looks like the call to function get_build_architecture in 
distutils.misc_util.py is python2.5 specific.

/Jörgen

C:\python\external\numpy>python setup.py config --compiler=mingw32 build 
--compiler=mingw32  install

Running from numpy source directory.
Traceback (most recent call last):
   File "setup.py", line 90, in ?
 setup_package()
   File "setup.py", line 62, in setup_package
 from numpy.distutils.core import setup
   File "c:\python24\lib\site-packages\PIL\__init__.py", line 5, in ?
 # package placeholder
   File "C:\python\external\numpy\numpy\distutils\ccompiler.py", line 
451, in ?
 msvc_on_amd64()
   File "C:\python\numeric-related\numpy\numpy\distutils\misc_util.py", 
line 324, in msvc_on_amd64
ImportError: cannot import name get_build_architecture

___
Numpy-discussion mailing list
Numpy-discussion@scipy.org
http://projects.scipy.org/mailman/listinfo/numpy-discussion


Re: [Numpy-discussion] Compilation failure on python2.4 win32

2007-09-20 Thread Jörgen Stenarson
Travis E. Oliphant skrev:
> Jörgen Stenarson wrote:
>> Hi,
>>
>> I cannot compile numpy (rev 2042) for python2.4 on win32, it works on 
>> python2.5. It looks like the call to function get_build_architecture in 
>> distutils.misc_util.py is python2.5 specific.
>>   
> Yes.  This needs to be fixed.   I'll do it. 
> 
> Can you try the current trunk?
> 

Will do tomorrow

/Jörgen
___
Numpy-discussion mailing list
Numpy-discussion@scipy.org
http://projects.scipy.org/mailman/listinfo/numpy-discussion


Re: [Numpy-discussion] Compilation failure on python2.4 win32

2007-09-21 Thread Jörgen Stenarson
Travis E. Oliphant skrev:
> Jörgen Stenarson wrote:
>> Hi,
>>
>> I cannot compile numpy (rev 2042) for python2.4 on win32, it works on 
>> python2.5. It looks like the call to function get_build_architecture in 
>> distutils.misc_util.py is python2.5 specific.
>>   
> Yes.  This needs to be fixed.   I'll do it. 
> 
> Can you try the current trunk?
> 

I still see problems

/Jörgen

.
.
.
Traceback (most recent call last):
   File "setup.py", line 90, in ?
 setup_package()
   File "setup.py", line 83, in setup_package
 configuration=configuration )
   File "C:\python\numeric-related\numpy\numpy\distutils\core.py", line 
176, in setup
   File "C:\Python24\lib\distutils\core.py", line 149, in setup
 dist.run_commands()
   File "C:\Python24\lib\distutils\dist.py", line 946, in run_commands
 self.run_command(cmd)
   File "C:\Python24\lib\distutils\dist.py", line 966, in run_command
 cmd_obj.run()
   File "C:\Python24\lib\distutils\command\build.py", line 112, in run
 self.run_command(cmd_name)
   File "C:\Python24\lib\distutils\cmd.py", line 333, in run_command
 self.distribution.run_command(command)
   File "C:\Python24\lib\distutils\dist.py", line 966, in run_command
 cmd_obj.run()
   File 
"C:\python\numeric-related\numpy\numpy\distutils\command\build_src.py", 
line 130, in run
   File 
"C:\python\numeric-related\numpy\numpy\distutils\command\build_src.py", 
line 147, in build_so
urces
   File 
"C:\python\numeric-related\numpy\numpy\distutils\command\build_src.py", 
line 250, in build_ex
tension_sources
   File 
"C:\python\numeric-related\numpy\numpy\distutils\command\build_src.py", 
line 307, in generate
_sources
   File "numpy\core\setup.py", line 109, in generate_config_h
 from distutils.msvccompiler import get_build_architecture
ImportError: cannot import name get_build_architecture
___
Numpy-discussion mailing list
Numpy-discussion@scipy.org
http://projects.scipy.org/mailman/listinfo/numpy-discussion


Re: [Numpy-discussion] Compilation failure on python2.4 win32

2007-09-23 Thread Jörgen Stenarson

Pearu Peterson skrev:

On Fri, September 21, 2007 10:23 pm, Jörgen Stenarson wrote:

Travis E. Oliphant skrev:

Jörgen Stenarson wrote:

Hi,

I cannot compile numpy (rev 2042) for python2.4 on win32, it works on
python2.5. It looks like the call to function get_build_architecture in
distutils.misc_util.py is python2.5 specific.


Yes.  This needs to be fixed.   I'll do it.

Can you try the current trunk?


I still see problems




   File "numpy\core\setup.py", line 109, in generate_config_h
 from distutils.msvccompiler import get_build_architecture
ImportError: cannot import name get_build_architecture


Try again the latest trunk.



No luck. The build works for me with the attached patch.

/Jörgen


binKKwyj1WqmG.bin
Description: application/applefile


get_build_architecture.patch
Description: Binary data
___
Numpy-discussion mailing list
Numpy-discussion@scipy.org
http://projects.scipy.org/mailman/listinfo/numpy-discussion