bp-kelley / descriptastorus

Descriptor computation(chemistry) and (optional) storage for machine learning
Other
226 stars 65 forks source link

Gilbrat check isn't correct #27

Closed KnathanM closed 5 months ago

KnathanM commented 9 months ago

In #22 the following fix was applied to account for scipy changing gilbrat to gibrat.

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

I think hasattr(dist, 'gilbrat') should be hasattr(st, 'gilbrat') as the statement will always be false. A string doesn't have the attribute 'gilbrat'.

KnathanM commented 9 months ago

This also fixes #24. scipy 1.9.0 first introduced gibrat. descriptastorus 2.6.1 (the current version) always tries to get the gibrat attribute from scipy.stats which will fail for any scipy<1.9.

bp-kelley commented 5 months ago

Thanks for this, for some reason I thought I had fixed it earlier.