[MATRIX-SIG] Numeric Error

Dale Bertrand Dale_Bertrand@brown.edu
Tue, 15 Jul 1997 17:50:46 -0400 (EDT)



I've written a c function which returns a string representing 35
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)



----------------------------------
E-Mail: Dale Bertrand <Dale_Bertrand@brown.edu>
Date: 15-Jul-97
----------------------------------

_______________
MATRIX-SIG  - SIG on Matrix Math for Python

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