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

Function _as_vector

python/openquant/feature_diagnostics.py:33–37  ·  view source on GitHub ↗
(y: Sequence[float], n_rows: int)

Source from the content-addressed store, hash-verified

31 if not rows:
32 raise ValueError("X cannot be empty")
33 width = len(rows[0])
34 if width == 0:
35 raise ValueError("X must contain at least one feature")
36 if any(len(r) != width for r in rows):
37 raise ValueError("X must be rectangular")
38 return rows
39
40

Callers 4

mdi_importanceFunction · 0.85
mda_importanceFunction · 0.85
sfi_importanceFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected