Skip to content

Commit

Permalink
casting component to string before checking for match when constructi…
Browse files Browse the repository at this point in the history
…ng a graph from a pixel object.
  • Loading branch information
ptajvar committed Nov 5, 2024
1 parent d9e4022 commit dbfbd98
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/pixelator/pixeldataset/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ def graph(
"""
if component_id:
potential_component = self.edgelist_lazy.filter(
pl.col("component") == component_id
pl.col("component").cast(pl.String) == component_id
)
if potential_component.head(1).collect().is_empty():
raise KeyError(f"{component_id} not found in edgelist")
Expand Down

0 comments on commit dbfbd98

Please sign in to comment.