()
| 23 | def test_to_polars_event_frame(): |
| 24 | df = openquant.adapters.to_polars_event_frame( |
| 25 | starts=["2024-01-01 09:30:00", "2024-01-01 09:35:00"], |
| 26 | ends=["2024-01-01 10:00:00", "2024-01-01 10:05:00"], |
| 27 | probs=[0.6, 0.55], |
| 28 | sides=[1.0, -1.0], |
| 29 | labels=[1, 0], |
| 30 | ) |
| 31 | assert df.columns == ["start_ts", "end_ts", "prob", "side", "label"] |
| 32 | assert df.height == 2 |
| 33 | |
| 34 | |
| 35 | def test_to_polars_indicator_matrix(): |
| 36 | ind = [[1, 0, 1], [0, 1, 1], [1, 1, 0]] |
| 37 | df = openquant.adapters.to_polars_indicator_matrix( |
nothing calls this directly
no outgoing calls
no test coverage detected