dwavesystems / dwavesystems/dimod

Provide a more informative deprecation message for `to_numpy_matrix` method

Open
#1,027 1 comment 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Python
Stars
143
Forks
91
Avg merge
1h 24m
Merged PRs (30d)
3

Description

**Description**
The method [`to_numpy_matrix`](https://github.com/dwavesystems/dimod/blob/e125795f183954d60fd8c5316eacceac7b85e495/dimod/binary/binary_quadratic_model.py#L1841) raises a deprecation warning with the message `bqm.to_numpy_matrix() is deprecated since dimod 0.10.0`. This [note](https://github.com/dwavesystems/dimod/blob/6d1e4b1fccbfa556599533f934f15143db1a0ef6/dimod/core/bqm.py#L1063) in the `bqm.py` file suggests to use the `to_dense` method instead but that method doesn't seem to exist in the code base. It is not clear whether an alternative is available for `to_numpy_matrix`.

**Proposed Solution**
Suggest an alternative(if any) to the `to_numpy_matrix` method with a short code snippet along with the current message.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.