Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ValueError with certain input file #28

Open
lodersky opened this issue Nov 27, 2019 · 1 comment
Open

ValueError with certain input file #28

lodersky opened this issue Nov 27, 2019 · 1 comment
Assignees
Labels
bug Something isn't working help wanted Extra attention is needed question Further information is requested

Comments

@lodersky
Copy link

Running the code with a certain input file (attached) gives the following error message:
Traceback (most recent call last):

  File ".../geoclustering/code/runme.py", line 18, in <module>
    k_means_clustering(paths, param)
  File "...\geoclustering\code\lib\kmeans_functions.py", line 340, in k_means_clustering
    optimum_no_of_clusters_for_raster = identify_opt_number_of_clusters(paths, param, i, size_of_raster, std_of_raster)
  File "...\geoclustering\code\lib\kmeans_functions.py", line 135, in identify_opt_number_of_clusters
    optimum_no_of_clusters_for_raster = int(np.ceil(group_by_part.loc[part, "share"] * maximum_no_of_clusters))
ValueError: cannot convert float NaN to integer

Would be helpful to get feedback on the error. The example files of the workshop are working fine.

Grundwassertemperatur.zip

@lodersky lodersky added bug Something isn't working help wanted Extra attention is needed question Further information is requested labels Nov 27, 2019
@kais-siala
Copy link
Contributor

For that, we need to save the TIF files (at the cuting stage) as float rasters.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants