-
Notifications
You must be signed in to change notification settings - Fork 38
Open
Labels
Description
In this example, LOGS is a MESA log dir with only one profile. The root cause is that when numpy.genfromtxt reads only one line from profiles.index, it returns an array of shape (3,) not (3,1).
I looked for a flag to genfromtxt that would force it to return a 2D array, but didn't see one.
Traceback (most recent call last):
File "test.py", line 3, in <module>
mr.MesaLogDir('LOGS')
File "/home/jschwab/Software/py_mesa_reader/mesa_reader/__init__.py", line 973, in __init__
self.read_logs()
File "/home/jschwab/Software/py_mesa_reader/mesa_reader/__init__.py", line 996, in read_logs
self.profiles = MesaProfileIndex(self.index_path)
File "/home/jschwab/Software/py_mesa_reader/mesa_reader/__init__.py", line 725, in __init__
self.read_index()
File "/home/jschwab/Software/py_mesa_reader/mesa_reader/__init__.py", line 745, in read_index
self.index_data = temp_index_data[np.argsort(temp_index_data[:, 0])]
IndexError: too many indices for array