Skip to content

Commit

Permalink
skip color len check
Browse files Browse the repository at this point in the history
  • Loading branch information
knaaptime committed Jan 6, 2025
1 parent 23f52a8 commit 80f7a42
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions geosnap/visualize/interactive.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ def explore(
in the same order as observations, by default None
extruded : bool, optional
whether to extrude geometries using the z-dimension, by default False
elevation_scale : int, optional
elevation_scale : float, optional
constant scaler multiplied by elevation valuer, by default 1
alpha : float, optional
alpha (opacity) parameter in the range (0,1) passed to
Expand Down Expand Up @@ -321,14 +321,6 @@ def _get_categorical_cmap(categories, cmap, nan_color, alpha):
colors = colormaps[cmap].resampled(n_cats)(list(range(n_cats)), alpha)
colors = (np.array(colors) * 255).astype(int)
colors = np.vstack([colors, nan_color])
n_colors = colors.shape[0]
if n_cats > n_colors:
warn(
"the number of unique categories exceeds the number of available colors",
stacklevel=3,
)
floor = (n_cats // n_colors) + 1
colors = np.vstack([colors] * floor)
temp_cmap = dict(zip(range(n_cats + 1), colors))
fill_color = apply_categorical_cmap(cat_codes, temp_cmap)
return fill_color

0 comments on commit 80f7a42

Please sign in to comment.