PolymerGuy / muDIC

Digital Image Correlation in Python
MIT License
160 stars 69 forks source link

AttributeError: module 'scipy.ndimage' has no attribute 'imread' #12

Closed e-dub closed 5 years ago

e-dub commented 5 years ago

I am getting this error with scipy version 1.3.0

Any ideas what I may be doing wrong?

Thanks!

PolymerGuy commented 5 years ago

Hi! Thanks for the question!

They have removed imread from ndimage after scipy 1.2.1. As a quick fix, I froze Scipy to version 1.2.1 in the requirements file.

If this is unpractical, we could move to another package such as imageio for imread?

Best regards Sindre

e-dub commented 5 years ago

I just tried opencv2 (cv2) for the imread, but it did not like the flatten command. I changed to $TERM.flatten(), but then there was another issue with array size.

PolymerGuy commented 5 years ago

I can give it a go. Did you clone the repo or install it via PIP?

e-dub commented 5 years ago

I cloned muDIC, installed opencv by apt install python3-openc

PolymerGuy commented 5 years ago

I have now changed from ndimage.imread to imageio.imread.

Try to pull the changes (or clone it once more) and it should work

e-dub commented 5 years ago

We are good. Thanks!