Dimension checking on assignment
Hello, For some time now I waws searching for the cause of a segmentation fault in a quite complex piece of software of ours which occured only under Windows and not under Linux nor under Solaris. Finally it seems that the case were some lines that did the following: from Numeric import * import numeric_version print numeric_version.version from numfort import arrayInfo import sys print sys.version m = ones((48,6,8), Complex) m = transpose(m,[2,0,1]) a =swapaxes(innerproduct(transpose([[1,0,0],[0,1,0],[0,0,1]]),m[:,:,:3]),0,-1) print a.typecode() print "arrayInfo(m):" arrayInfo(m) print "arrayInfo(a):" arrayInfo(a) print m[:,:,:3].shape print a.shape print m[1,1,1] m[:,:,:3]=a print m[1,1,1] m[:,:,3:]=a print m[1,1,1] the nuarray.arrayInfo just prints the dimensions and strides of a Numeric array. With this script I get
under Linux. The code does not segfault when I print m in whole ("print m" instead of "print m[1,1,1]") and it does not segfault in my compelex program. It does segfault in my complex program under Windows. Versions are 2.3.2 for python and 23.1 for Numeric under Windows. The main question is, why is no exception raised on the incompatible dimensions in this example? Kind regards Berthold Höllmann -- Germanischer Lloyd AG CAE Development Vorsetzen 35 20459 Hamburg Phone: +49(0)40 36149-7374 Fax: +49(0)40 36149-7320 e-mail: hoel@gl-group.com Internet: http://www.gl-group.com **************************************************** Please notice: We would like to inform you that the e-mail address of Germanischer Lloyd as well as our internet address had been changed to gl-group.com with effect from 1st March 2003. This means that the previous address shortmark@germanlloyd.org will be replaced by shortmark@gl-group.com. From now on the GL homepage can be accessed at the address 'http://www.gl-group.com'. The old addresses remain valid for a transitional period. **************************************************** This e-mail contains confidential information for the exclusive attention of the intended addressee. Any access of third parties to this e-mail is unauthorised. Any use of this e-mail by unintended recipients such as copying, distribution, disclosure etc. is prohibited and may be unlawful. When addressed to our clients the content of this e-mail is subject to the General Terms and Conditions of GL's Group of Companies applicable at the date of this e-mail. GL's Group of Companies does not warrant and/or guarantee that this message at the moment of receipt is authentic, correct and its communication free of errors, interruption etc.
Berthold Höllmann <hoel@gl-group.com> writes:
This is bug 857622 on SF now. Kind regards Berthold Höllmann -- Germanischer Lloyd AG CAE Development Vorsetzen 35 20459 Hamburg Phone: +49(0)40 36149-7374 Fax: +49(0)40 36149-7320 e-mail: hoel@gl-group.com Internet: http://www.gl-group.com **************************************************** Please notice: We would like to inform you that the e-mail address of Germanischer Lloyd as well as our internet address had been changed to gl-group.com with effect from 1st March 2003. This means that the previous address shortmark@germanlloyd.org will be replaced by shortmark@gl-group.com. From now on the GL homepage can be accessed at the address 'http://www.gl-group.com'. The old addresses remain valid for a transitional period. **************************************************** This e-mail contains confidential information for the exclusive attention of the intended addressee. Any access of third parties to this e-mail is unauthorised. Any use of this e-mail by unintended recipients such as copying, distribution, disclosure etc. is prohibited and may be unlawful. When addressed to our clients the content of this e-mail is subject to the General Terms and Conditions of GL's Group of Companies applicable at the date of this e-mail. GL's Group of Companies does not warrant and/or guarantee that this message at the moment of receipt is authentic, correct and its communication free of errors, interruption etc.
participants (1)
-
Berthold Höllmann