[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?HfQ@JpnN@c
                                   
PH>sOz?@2aEaJ@[s?n(C͢o@U=lQAzdy
                                                                               
@[@@[d@[q\O?dW<bJ%I8/ھ@R/Ax?(1L_@Ud$
      o@6??;@a_]Ե@DJ@GfA@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
_______________