pauliacomi / pyGAPS

A framework for processing adsorption data and isotherm fitting
MIT License
63 stars 24 forks source link

module 'scipy' has no attribute 'stats' #30

Closed hesmalek closed 2 years ago

hesmalek commented 2 years ago

Describe the bug A clear and concise description of what the bug is.

To Reproduce Steps to reproduce the behavior:

import pygaps as pg

from scipy import stats, optimize, interpolate

isotherm = pg.isotherm_from_json(r'carbon_x1_n2.json')

isotherm.plot()

result_dict = pg.area_BET(isotherm, verbose=True)

[module 'scipy' has no attribute 'stats']()

Expected behavior A clear and concise description of what you expected to happen.

Screenshots If applicable, add screenshots to help explain your problem.

System (please complete the following information):

Additional context Add any other context about the problem here.

Please run the quick start one time to check the errors with the updated consols.

Where you are from?/How are you using pyGAPS? (optional) I'm always curious to see how pyGAPS is used and if it is useful to people. Don't fill this in if you don't want to tell me.

I'm from the UK. It's for personal use. I'm an adsorption researcher.

pauliacomi commented 2 years ago

Hi @hesmalek ,

Thanks for opening the issue.

Someone told me about this problem before. Currently putting the finishing touches on pyGAPS version 4.0, which should have this fixed. If you do not want to wait a couple of days until the release, you can install the dev branch like this:

pip install git+https://github.com/pauliacomi/pyGAPS@develop

The root cause was a lazy import for scipy I put in place to try to reduce the package load time. However it ended up messing up if you imported scipy normally alongside it. It was reverted in this commit: https://github.com/pauliacomi/pyGAPS/commit/034043ff94982742b1d35b3c1ab0996bf5bf6014

I will leave this issue open until the release comes out!

-pi

pauliacomi commented 2 years ago

Should be solved with the release of v4.0.2

Let me know if you have any further issues.

-pi

hesmalek commented 2 years ago

Thanks pi. It is solved now. Cheers.

Hesmalek