molzip icon indicating copy to clipboard operation
molzip copied to clipboard

Issue with descriptastorus

Open janweinreich opened this issue 1 year ago • 0 comments

all packages installed but get:

AttributeError: module 'scipy.stats' has no attribute 'gibrat'. Did you mean: 'gilbrat'?

comes from site-packages/descriptastorus/descriptors/rdNormalizedDescriptors.py

ogger = logging.getLogger("descriptastorus")

cdfs = {}

for name, (dist, params, minV,maxV,avg,std) in dists.dists.items():
    arg = params[:-2]
    loc = params[-2]
    scale = params[-1]

    if dist in ['gilbrat', 'gibrat']:
        # fix change in scikit learn
        if hasattr(dist, 'gilbrat'):
            dist = 'gilbrat'
        else:
            dist = 'gibrat'

dirty fix: comment these lines:

    if dist in ['gilbrat', 'gibrat']:
        # fix change in scikit learn
        #if hasattr(dist, 'gilbrat'):
        dist = 'gilbrat'
        #else:
        #dist = 'gibrat'

The error message AttributeError: module 'scipy.stats' has no attribute 'gibrat', suggests that we are trying to access an attribute gibrat in the scipy.stats module, which does not exist in the SciPy library. The error message also suggests an alternative: gilbrat.

janweinreich avatar Jan 29 '24 08:01 janweinreich