Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/fair/io/fill_from.py
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,8 @@ def fill_from_pandas(self, mode, df):
data_in = data_in.squeeze()

# interpolate from the supplied file to our desired timepoints
interpolator = interp1d(times_array, data_in, bounds_error=False)
mask_nan = ~np.isnan(data_in)
interpolator = interp1d(times_array[mask_nan], data_in[mask_nan], bounds_error=False, fill_value=0.)
data = interpolator(mode_time[mode])

# Parse and possibly convert unit in input to what FaIR wants
Expand Down