Skip to content

Commit

Permalink
support multilevel variables
Browse files Browse the repository at this point in the history
  • Loading branch information
jensdebruijn committed Jan 10, 2025
1 parent fddb84e commit 5e1e545
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions honeybees/reporter.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,12 @@
- ...
"""

import sys
import re
from collections.abc import Iterable
import os
import numpy as np

try:
import cupy as cp
except (ModuleNotFoundError, ImportError):
pass
import pandas as pd
from operator import attrgetter
from numba import njit
from math import isinf
from copy import deepcopy
Expand Down Expand Up @@ -398,7 +393,7 @@ def extract_agent_data(self, name: str, conf: dict) -> None:
name: Name of the data to report.
conf: Dictionary with report configuration for values.
"""
agents = getattr(self.model.agents, conf["type"])
agents = attrgetter(conf["type"])(self.model.agents)
varname = conf["varname"]
fancy_index = re.search(r"\[.*?\]", varname)
if fancy_index:
Expand Down

0 comments on commit 5e1e545

Please sign in to comment.