[IMAGE-SIG] Numeric Error

Dale Bertrand dcb@lems.brown.edu
Tue, 15 Jul 1997 16:16:51 -0400


I've written a c function which returns a string representing 7
doubles.  I wish to convert this string into a Numeric array for further
processing.  Unfortunately, Numeric dumps a core when I call
Numeric.fromstring.  I am sure the string is the right lenghth and have
no idea what is going on.
Shouldn't Numeric accept the data as long as it's the right length?  Is
there something I'm missing?

Thanks in advance.


-- code --
f =
"/vision/medprojects/crisco/shocks/quad1-surfaces/quad1-0.00--0.50-00%d.raw"
% i
print "filename: ", f
shocks_string = sd.detect(f,135,135)
print "length of string: ", len(shocks_string)
print "string: ", shocks_string
aa = Numeric.fromstring(shocks_string, Numeric.Float)
print aa

-- output --
filename: 
/vision/medprojects/crisco/shocks/quad1-surfaces/quad1-0.00--0.50-001.raw
length of string:  280
string:  @G ^m@65*ðh?ðHfãQæ@JpnäN@cÕ
                                   
P¶ôÀH>sOz?¬@2aE­aJ@[s?ónè(ÀCÍ¢ÆoÀ@U=lQAzÀdyÔ
                                                                               
Ø@[@@[¹ d@[q\ãOñø?ödW§à<ÀbÊJ%I8À/Ú¾¿î¢@RÒ/AÇxô?ø(1ÈL_@Udµ$
      o@6À?Ó?ð;±ªú@aÏ_éÉÀ]þÔµ@DJ°¨¶@GöfáAü@5ñ|¬±Ú?ðÑe@/M(@evÚàÌ^À3u\ÖO
Segmentation fault (core dumped)
dcb@lems61 396 >

-- sig --
Dale Bertrand
(dcb@lems.brown.edu)

_______________
IMAGE-SIG - SIG on Image Processing with Python

send messages to: image-sig@python.org
administrivia to: image-sig-request@python.org
_______________