MCPcopy Index your code
hub / github.com/bayesian-optimization/BayesianOptimization / _hashable

Function _hashable

bayes_opt/target_space.py:30–32  ·  view source on GitHub ↗

Ensure that a point is hashable by a python dict.

(x: NDArray[Float])

Source from the content-addressed store, hash-verified

28
29
30def _hashable(x: NDArray[Float]) -> tuple[float, ...]:
31 """Ensure that a point is hashable by a python dict."""
32 return tuple(map(float, x))
33
34
35class TargetSpace:

Callers 3

__contains__Method · 0.85
registerMethod · 0.85
probeMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected