Skip to content

Commit

Permalink
Bugfix - which_ids in util.classification for templates
Browse files Browse the repository at this point in the history
  • Loading branch information
morganjwilliams committed Nov 1, 2024
1 parent 287e161 commit a7be1ff
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions pyrolite/util/classification.py
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ def _add_polygons_to_axes(
axes_scale=100.0,
add_labels=False,
which_labels="ID",
which_ids=[],
which_ids=None,
**kwargs,
):
"""
Expand Down Expand Up @@ -247,7 +247,7 @@ def _add_polygons_to_axes(

use_keys = not which_labels.lower().startswith("name")

if not which_ids:
if which_ids is None:
which_ids = list(self.fields.keys())

for k, cfg in self.fields.items():
Expand Down Expand Up @@ -412,7 +412,7 @@ def add_to_axes(
axes_scale=100.0,
add_labels=False,
which_labels="ID",
which_ids=[],
which_ids=None,
label_at_centroid=True,
**kwargs,
):
Expand Down Expand Up @@ -472,7 +472,7 @@ def add_to_axes(
if not np.isclose(self.default_scale, axes_scale):
rescale_by = axes_scale / self.default_scale

if not which_ids:
if which_ids is None:
which_ids = list(self.fields.keys())

if add_labels:
Expand Down

0 comments on commit a7be1ff

Please sign in to comment.