I don't have your exact dataset, but the following code worked for me:
a = np.array(['-0.399917', '0.441786']) # (Line 1)
dim = (2, 2, 2, 2)
a = np.tile(a, dim)
b = a.astype(float)
I know the dimensions aren't the same as you have, but that shouldn't make a difference. What is likely happening is that some of the values in your vector are not of the form you specified. For example, the following both raise your ValueError when they are used in (Line 1):
a = np.array(['-0.399917', '0.441786', ''])
a = np.array(['-0.399917', '0.441786', 'spam'])
It is likely that you have either empty values, string values, or something similar in your array somewhere.
If the values are empty, you can do something like was suggested here:
a[a==''] = '0'
or whatever value you want it to be. You can do a similar thing with other string values as long as they have a pattern. If they don't have a pattern, you can still do this, but it may not be feasible to go through looking for all the possibilities.
EDIT: If you don't care what the strings are, you just want them turned into nan, you can use np.genfromtxt
as explained here. That might or might not be dangerous, depending on your application. Often, codes are given to indicate something about the array element and you might not want to treat them all the same.