spectralpython / spectral

Python module for hyperspectral image processing
MIT License
571 stars 139 forks source link

ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all() #76

Closed BlcaKHat closed 6 years ago

BlcaKHat commented 6 years ago

I am facing this error while running GUI with spectral. Traceback (most recent call last): File "D:\llfg\hrs\RS Datasets Viewer\OpenImage.py", line 150, in browse while wi < (self.width) and zero==0: ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all()

tboggs commented 6 years ago

This is a general python issue. It appears you are trying to make a boolean comparison with a variable that is a numpy array (wi, zero, or self.width). Do a web search for the text of your error and you should find plenty of results.

BlcaKHat commented 6 years ago

I tried my best . if you can try, I will upload the code.