Skip to content

Commit

Permalink
first attempt at skipping unwanted rows in csv to ins
Browse files Browse the repository at this point in the history
  • Loading branch information
jtwhite79 committed Jan 27, 2021
1 parent 28a7178 commit 9caf498
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 2 additions & 2 deletions autotest/pst_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -962,13 +962,13 @@ def read_in_tpl_test():
# change_limit_test()
# new_format_test()
# lt_gt_constraint_names_test()
# csv_to_ins_test()
csv_to_ins_test()

# try_process_ins_test()
# write_tables_test()
# res_stats_test()
# test_write_input_files()
add_obs_test()
#add_obs_test()
#add_pars_test()
# setattr_test()

Expand Down
4 changes: 3 additions & 1 deletion pyemu/pst/pst_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -1136,7 +1136,9 @@ def csv_to_ins_file(
f.write("l1\n") # skip the row (index) label
for i, rlabel in enumerate(rlabels): # loop over rows
f.write("l1")

if (rlabel not in only_rlabels):
f.write("\n")
continue
c_count = 0
line = ''
for j, clabel in enumerate(clabels): # loop over columns
Expand Down

0 comments on commit 9caf498

Please sign in to comment.