I know this is probably pretty basic, but I keep getting following error when I try to load my file into python.like
ValueError: could not convert string to float
I have tried
input = np.loadtxt("input.txt", dtype='i', delimiter=' ')
open(file.txt,'r')
and read csv
but can't get it to read properly, probably just some small mistake.
The file look like the example below. I don't need the top row, as they just explain limits and the step size between the data. there are multiple spaces between the numbers and some empty lines
Thanks
-89.9916666667 89.9916666667 -0.0083333333 360.0083333333 0.0166666667 0.0166666667
15.0900 15.0740 15.0730 15.0730 15.0730 15.0730
15.0730 15.0730 15.0730 15.0730 15.0730 15.0730
15.0730 15.0730 15.0740 15.0740 15.0740 15.0740
15.0740 15.0740 15.0730 15.0730 15.0730 15.0730
15.0730 15.0730 15.0730 15.0720 15.0720 15.0720
15.0720 15.0720 15.0720 15.0720 15.0710 15.0710
15.0710 15.0710 15.0710 15.0710 15.0710 15.0720
15.0720 15.0730 15.0730 15.0740 15.0740 15.0740
15.0740 15.0740 15.0730 15.0730 15.0730 15.0730
15.0730 15.0730 15.0740 15.0740 15.0750 15.0750
15.0760 15.0760 15.0760 15.0760 15.0760 15.0750
15.0750 15.0740 15.0740 15.0740 15.0730 15.0730
15.0730 15.0730 15.0730 15.0730 15.0730 15.0730
15.0740 15.0740 15.0740 15.0750 15.0750 15.0750
15.0760 15.0760 15.0760 15.0760 15.0760 15.0760
15.0760 15.0760 15.0760 15.0760 15.0750 15.0740
15.0740 15.0740 15.0740 15.0730 15.0730 15.0730
15.0730 15.0730 15.0720 15.0720 15.0720 15.0720
15.0720 15.0720 15.0720 15.0720 15.0710 15.0710
15.0710 15.0710 15.0710 15.0710 15.0710 15.0710
15.0710 15.0710 15.0710 15.0710 15.0710 15.0710
15.0710 15.0710 15.0710 15.0710 15.0710 15.0710
15.0710 15.0710 15.0710 15.0710 15.0710 15.0710
15.0710 15.0710 15.0720 15.0720 15.0730 15.0730
15.0730 15.0730 15.0730 15.0740 15.0730 15.0730
15.0730 15.0730 15.0730 15.0730 15.0730 15.0730
15.0730 15.0730 15.0730 15.0730 15.0730 15.0720
15.0720 15.0720 15.0710 15.0710 15.0700 15.0700
15.0700 15.0710 15.0710 15.0710 15.0720 15.0720
15.0720 15.0730 15.0730 15.0730 15.0740 15.0740
15.0740 15.0740 15.0740 15.0740 15.0740 15.0740
15.0740 15.0730 15.0730 15.0730 15.0730 15.0730
15.0730 15.0720 15.0720 15.0720 15.0720 15.0720
15.0720 15.0710 15.0710 15.0710 15.0710 15.0710
15.0710 15.0710 15.0710 15.0710 15.0710 15.0710