Is there any built-in method to get back numpy
array after applying str()
method, for example,
import numpy as np
a = np.array([[1.1, 2.2, 3.3], [4.4, 5.5, 6.6]])
a_str = str(a)
#to get back a?
a = some_method(a_str).
Following two methods don't work:
from ast import literal_eval
a = literal_eval(a_str) # Error
import numpy as np
a = np.fromstring(a_str) # Error
Update 1:
Unfortunatelly i have very big data already converted with str()
method so I connot reconvert it with some other method.