Skip to content
Snippets Groups Projects
Commit f94e06f2 authored by Frisinghelli Daniel's avatar Frisinghelli Daniel
Browse files

Force Float32 dtype when plotting.

parent 26e56b60
No related branches found
No related tags found
No related merge requests found
...@@ -243,7 +243,7 @@ def plot_sample(x, use_bands, labels, ...@@ -243,7 +243,7 @@ def plot_sample(x, use_bands, labels,
# check whether to apply constrast stretching # check whether to apply constrast stretching
rgb = np.dstack([np.clip( rgb = np.dstack([np.clip(
contrast_stretching(x[use_bands.index(band), ...], alpha), 0, 1) contrast_stretching(x[use_bands.index(band), ...], alpha), 0, 1)
for band in bands]) for band in bands]).astype(np.float32)
# sort the labels in ascending order # sort the labels in ascending order
sorted_labels = {k: v for k, v in sorted(labels.items())} sorted_labels = {k: v for k, v in sorted(labels.items())}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment