Skip to content

Commit

Permalink
no need to enumerate
Browse files Browse the repository at this point in the history
  • Loading branch information
HaleySchuhl committed May 6, 2024
1 parent e836c07 commit 52e890a
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions plantcv/annotate/classes.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,10 +83,9 @@ def save_counts(self, label=None):
"""Save collected coordinates to Outputs.observations"""
if label is None:
label = params.sample_label
for i, x in enumerate(self.count.keys()):
variable = x
for x in self.count.keys():
value = self.count[x]
outputs.add_observation(sample=label, variable=str(variable) + "_count",
outputs.add_observation(sample=label, variable="object_count",
trait='count of category',
method='count', scale='count', datatype=int,
value=value, label='none')
Expand All @@ -95,8 +94,7 @@ def save_coords(self, label=None):
"""Save collected coordinates to Outputs.observations"""
if label is None:
label = params.sample_label
for i, x in enumerate(self.count.keys()):
variable = x
for x in self.count.keys():
value = self.coords[x]
outputs.add_observation(sample=label, variable="coordinates",
trait='collected coordinates',
Expand Down

0 comments on commit 52e890a

Please sign in to comment.