MCPcopy Create free account
hub / github.com/Open-Quant/openquant / test_to_polars_indicator_matrix

Function test_to_polars_indicator_matrix

python/tests/test_adapters_viz.py:37–41  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

35def test_to_polars_indicator_matrix():
36 ind = [[1, 0, 1], [0, 1, 1], [1, 1, 0]]
37 df = openquant.adapters.to_polars_indicator_matrix(
38 ind, bar_index=[10, 11, 12], label_names=["a", "b", "c"]
39 )
40 assert df.columns == ["bar_index", "a", "b", "c"]
41 assert df["a"].to_list() == [1, 0, 1]
42
43
44def test_to_polars_weights_frontier_backtest():

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected