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

gt.save_tiles issue: TypeError: ufunc 'isnan' not supported for the input types, and the inputs could not be safely coerced to any supported types according to the casting rule ''safe'' #64

Closed
iamtekson opened this issue Dec 11, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@iamtekson
Copy link
Member

---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
Cell In[19], line 13
     11 gt.generate_tiles(save_tiles=False)
     12 gt.convert_nan_to_zero()
---> 13 gt.save_tiles(f"../../../data/tiles/mask_l8_{year}/{mask_location}", prefix=f'{mask_location}_l8_')

File ~/miniconda3/envs/tf212/lib/python3.9/site-packages/geotile/GeoTile.py:449, in GeoTile.save_tiles(self, output_folder, prefix, suffix, image_format, dtype)
    446 meta.update({"dtype": dtype or self.get_dtype(self.tile_data)})
    448 # solve nodata related issue #56
--> 449 if ((np.isnan(meta['nodata'])) and (meta['dtype'] in _int_dtypes)):
    450     meta.update({'nodata': None})
    452 # iterate through the offsets and windows_data and save the tiles

TypeError: ufunc 'isnan' not supported for the input types, and the inputs could not be safely coerced to any supported types according to the casting rule ''safe''
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant