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

get a TypeError when plotting #2

Open
aarifsk opened this issue Jun 17, 2019 · 2 comments
Open

get a TypeError when plotting #2

aarifsk opened this issue Jun 17, 2019 · 2 comments

Comments

@aarifsk
Copy link

aarifsk commented Jun 17, 2019

code :- import utils.data_cube_utilities.plotter_utils as plotter
plotter.plot_band(cleaned_landsat_dataset, ndvi_data_arr)

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''

--> 657 within plotter_utils.py mask = ~np.isnan(means) & ~np.isnan(medians)

Notebook name :- NDVI_Thresholds

@aarifsk
Copy link
Author

aarifsk commented Jun 17, 2019

the error can be fixed by replacing np.isnan with pd.isnull

however, the next immediate line throws an error. This is because the method is not defined to receive two xarray datasets as arguments and is as follows :-

def plot_band(dataset, figsize=(20,15), fontsize=24, legend_fontsize=24)

however, the call made in the notebook is
plotter.plot_band(cleaned_landsat_dataset, ndvi_data_arr)

and the ndvi_data_arr is interpreted as the figsize

@aarifsk
Copy link
Author

aarifsk commented Jun 17, 2019

plotter.plot_band(cleaned_landsat_dataset, ndvi_data_arr) should be changed to
plotter.plot_band(ndvi_data_arr)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant