williamhunter / topy

Topology Optimization using Python
Other
481 stars 130 forks source link

Fix formatting error in example problem beam_3d_exp_gsf.tpd #11

Closed jestuber closed 8 years ago

jestuber commented 8 years ago

Extra space in front of line 25 was causing example problem to not work. The code would read in the line as input, then fail with the following:

Traceback (most recent call last): File "optimise.py", line 21, in t.load_tpd_file(argv[1]) File "/usr/local/lib/python2.7/dist-packages/topy/topology.py", line 82, in load_tpd_file self.topydict = tpd_file2dict(fname) File "/usr/local/lib/python2.7/dist-packages/topy/parser.py", line 89, in tpd_file2dict d = _parsev2007file(s) File "/usr/local/lib/python2.7/dist-packages/topy/parser.py", line 123, in _parsev2007file d[pair[0].strip()] = pair[1].strip() IndexError: list index out of range

Removing the space allows the example to run

williamhunter commented 8 years ago

Thanks.