def test_create_gap_overlap(self): my_df = pa.Table.from_pydict({ "timestamps": [1000., 8000., 9000., 15000.], "data": [50., 400., 450., 750.] }) gaps = [(4000., 6000.), (1000., 8000.), (9000., 15000.)] filled_df = gpu.fill_gaps(my_df, gaps, 1000.) self.assertEqual(len(filled_df[0]["timestamps"].to_numpy()), 15)
def test_create_gap_before_begin(self): my_df = pa.Table.from_pydict({ "timestamps": [11000., 18000., 19000., 25000.], "data": [50., 400., 450., 750.] }) gaps = [(1000., 18000.), (19000., 29000.)] filled_df = gpu.fill_gaps(my_df, gaps, 1000.) self.assertEqual(len(filled_df[0]["timestamps"].to_numpy()), 15)