automl / automl/ConfigSpace

`np.array` on `Configuration` returns names of HPs instead of values

Open
#363 5 comments 0 reactions 1 assignee Claimed by @thijssnelleman View on GitHub
enhancement good first issue
Dominant language
Python
Stars
225
Forks
94
PR merge metrics
No merged PRs in 30d

Description

When calling `np.array` on `Configuration` it returns names of HPs instead of values. Is that intended?
ConfigSpace 0.7.1

MWE:
```python
import numpy as np
from ConfigSpace import ConfigurationSpace, Float

cs = ConfigurationSpace()
for i in range(3):
cs.add_hyperparameter(Float(f"x_{i}", (0, 1)))

config = cs.sample_configuration()
print("output:", np.array(config))
print("expected:", config.get_array())
```
Output:
```
output: ['x_0' 'x_1' 'x_2']
expected: [0.09972031 0.91072326 0.16544557]
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.