NREL/nsrdb

os.path.basename nan handling

Closed this issue · 1 comments

bnb32 commented

os.path.basename throws run ending error when file is missing (nan for file name)

file_names = [os.path.basename(fp) for fp in file_names]

proposed solution:

file_names = [os.path.basename(fp) if isinstance(fp, str)
else fp for fp in file_names]

I like it!