Does anyone know, how I could skip the parenthesis from a text file I trying to read using numpy.genfromtxt
My data file is of the format
1.466 ((5.68 3.3 45.7)(4.5 6.7 9.5))
Does anyone know, how I could skip the parenthesis from a text file I trying to read using numpy.genfromtxt
My data file is of the format
1.466 ((5.68 3.3 45.7)(4.5 6.7 9.5))
np.genfromtxt can accept iterators:
yields
Alternatively, you could use (in Python2) the
str.translate
or (in Python3) thebytes.translate
method, which is a bit faster: