Not a specialist in boost.python by any stretch - but as a quick sanity check, have you tried data_max=float(dim) to see if it's failing to do the implicit conversion? On 2020-08-04 12:56, Winter, Graeme (DLSLtd,RAL,LSCI) wrote:
H = flex.histogram(coords, data_min=0.0, data_max=dim, n_slots=dim)
Gives
Boost.Python.ArgumentError: Please report this error to [email protected]: Python argument types in histogram.__init__(histogram) did not match C++ signature: __init__(_object*, double, double, double, scitbx::af::shared<long>, unsigned long) __init__(_object*, scitbx::histogram
other, scitbx::af::const_ref data, double relative_tolerance=0.0001) __init__(_object*, scitbx::af::const_ref data, double data_min, double data_max, unsigned long n_slots=1000, double relative_tolerance=0.0001) __init__(_object*, scitbx::af::const_ref data, unsigned long n_slots=1000) Despite
coords being
with shape
(31294944,)
and dim being 18093576 (i.e. integer)
and
h = flex.histogram(a, data_min=0, data_max=100, n_slots=100)
working fine in another context i.e. the calling convention is correct
This has so far cost a few hours, so what gives? How can this be holding it wrong? C++ code suggests that the bin types are long so this should be fine
Any hints?
Thanks Graeme