CLM-error in eoLearn-slovenia Land Cover Classification script

I don’t think I get what you are trying to say . :frowning_face:
So following your explanations on GitHub and here, I tried to further investigate the source of the NaN values. So I did the following:

# Checking if there is NaN values in Red, NIR, and NDVI multidimentional arrays

Red=eo.data['BANDS'][0][..., [3]]

NIR=eo.data['BANDS'][0][..., [7]]

ndvi=eo.data['NDVI'][0]

Denom=NIR+Red

np.isnan(Red).any(), np.isnan(NIR).any(), np.isnan(Denom).any(), np.isnan(ndvi).any()       #(False, False, False, False)

# Checking if there are zeros in Red, NIR, and NDVI multidimentional arrays

0 in Red, 0 in NIR, 0 in Denom, 0 in ndvi           #(False, False, False, True)

eo: the patch
Denom: denominator
if denom is different than zero and different than NaN than why the error says
RuntimeWarning: invalid value encountered in true_divide
I really can’t wrap my head around this.

Hi @rim.sleimi,

so far I was talking about the general cases where values can be nan or 0. In your case, since you check if they are NAN or 0 in the beginning, I agree that it sounds fishy that this error would occur. Unfortunately, I cannot say anything at this point.

Would it be possible that you prepare a minimal working example where this error is produced, along with providing the data where this happens?

Sure. Would the Notebook that I am currently working on be fine ?

Of course. Could I please ask you to create a new ticket for this? Either here or eo-learn Github is fine.

Thanks!

New ticket=New issue?
How will I share the data (i.e, country boundary map/ already downloaded eopatches)?

Sorry, I missed this. Did you already create a new issue?

No I haven’t. How can I do that?

Hi @rim.sleimi

you can also open a new github issue on eolearn, where you provide a minimal working example of the issues that you are having. Just go here an click on “new issue”.