mirror of
https://github.com/boostorg/histogram.git
synced 2026-01-30 07:52:11 +00:00
fixed bug when adding adaptive_storage to itself, more test coverage
This commit is contained in:
@@ -231,12 +231,14 @@ histogram_variance(python::tuple args, python::dict kwargs) {
|
||||
|
||||
struct storage_access {
|
||||
static
|
||||
python::dict
|
||||
python::object
|
||||
array_interface(dynamic_histogram<>& self) {
|
||||
const auto& b = self.storage_.buffer_;
|
||||
if (b.type_.id_ == 5) {
|
||||
PyErr_SetString(PyExc_RuntimeError, "cannot convert multiprecision storage to numpy array");
|
||||
boost::python::throw_error_already_set();
|
||||
// PyErr_SetString(PyExc_KeyError, "cannot convert multiprecision storage to numpy array");
|
||||
// python::throw_error_already_set();
|
||||
// workaround: for some reason, exception is ignored here
|
||||
return python::object();
|
||||
}
|
||||
|
||||
python::dict d;
|
||||
|
||||
Reference in New Issue
Block a user