Skip to content

Commit

Permalink
Remove PCA colormap bug for float output maps (#2620)
Browse files Browse the repository at this point in the history
Previously, "PCA" would be offered as a colormap option for float outputs (and throws "PCA is not a known colormap" error).
  • Loading branch information
chungmin99 authored Nov 27, 2023
1 parent 43703fa commit c896ee4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion nerfstudio/viewer_beta/control_panel.py
Original file line number Diff line number Diff line change
Expand Up @@ -445,7 +445,7 @@ def _get_colormap_options(dimensions: int, dtype: type) -> List[Colormaps]:
if dimensions == 3:
colormap_options = ["default"]
if dimensions == 1 and dtype in [torch.float64, torch.float32, torch.float16, torch.bfloat16]:
colormap_options = [c for c in list(get_args(Colormaps)) if c != "default"]
colormap_options = [c for c in list(get_args(Colormaps)) if c not in ("default", "pca")]
if dimensions > 3:
colormap_options = ["pca"]
return colormap_options

0 comments on commit c896ee4

Please sign in to comment.