dwavesystems / dwavesystems/dimod
dimod.SampleSet.data mismatched default for sample_dict_cast
- Dominant language
- Python
- Stars
- 143
- Forks
- 91
- Avg merge
- 1h 24m
- Merged PRs (30d)
- 3
Description
**Description**
Description of `sample_dict_cast` claims default is False and warns of implications of setting to True:
```
sample_dict_cast (bool, optional, default=False) – If True, samples are returned as dicts rather than SampleView. Note that this can lead to very heavy memory usage.
```
But definition is : `def data(self, fields=None, sorted_by='energy', name='Sample', reverse=False, sample_dict_cast=True, index=False)`
and code:
```
if sample_dict_cast:
sample = dict(sample)
```
**Steps To Reproduce**
https://github.com/dwavesystems/dimod/blob/master/dimod/sampleset.py
**Expected Behavior**
Based on the warning, I'd expect it to be False by default.
**Environment**
- OS: all
- Python version: all
**Additional Context**
None
Contributor guide
Assessment
This issue has not been assessed yet.