load signed data joins problem

Thanks, your solution is very good.
But I have still one problem: the last line makes this:

x = np.fromstring(b,sep=’’)
x
array([ 8.56506822e-072, 2.92021791e-033, 2.25187638e+006, …,
6.99021630e-077, 1.39804329e-076, 2.66133772e-260])

As you can see, it doesn’t load the exponent right!

On other hand, I don’t understand why I get an exception with:

a
’ 0.000000000E+00 1.806088833E-02-4.959341557E+07 0.000000000E+00 0.000000000E+00\n’

a2 = a.replace(‘E-’,‘EE’).replace(’-’,’ -’).replace(‘EE’,‘E-’)
y = np.fromstring(a2,sep=’’)
Traceback (most recent call last):
File “”, line 1, in
ValueError: string size must be a multiple of element size

Thank you

2009/4/22 Gary Ruben <gary.ruben@…287…>

···

(offlist)

In case you haven’t seen it before, there’s an implied line at the start:

import numpy as np

making the code

import numpy as np

f = open(file)

s = f.read()

f.close()

a = s.replace(‘E-’,‘EE’).replace(’-’,’ -’).replace(‘EE’,‘E-’)

x = np.fromstring(a, sep=’ ')

Gary Ruben wrote:

How about

f = open(file)

s = f.read()

f.close()

a = s.replace(‘E-’,‘EE’).replace(’-’,’ -’).replace(‘EE’,‘E-’)

x = np.fromstring(a, sep=’ ')

Gary R.