Skip to content

Commit a5453f3

Browse files
committed
fix: numpy dependency; added error msg for key error
1 parent 0c0d515 commit a5453f3

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ authors = [
77
]
88
requires-python = ">=3.11"
99
dependencies = [
10-
"numpy>=2.3.1",
10+
"numpy>=2.0.2",
1111
"plotly>=6.2.0",
1212
"plotly-3d-primitives>=0.4.0",
1313
"pydantic>=2.11.7",

src/pynite_tools/envelope.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,10 @@ def envelope_tree(tree: dict | list, levels: list[Hashable | None], leaf: Hashab
3737
# Otherwise, pop the next level and dive into the tree on that branch
3838
level = levels[0]
3939
if level is not None:
40+
try:
41+
tree[level]
42+
except KeyError:
43+
raise KeyError(f"Key '{level}' does not exist at this level. Available keys: {list(tree.keys())}")
4044
env_acc.update({level: envelope_tree(tree[level], levels[1:], leaf, agg_func, with_trace)})
4145
return env_acc
4246
else:

0 commit comments

Comments
 (0)