Skip to content

Commit

Permalink
add lru_cache to get_xy_extent
Browse files Browse the repository at this point in the history
  • Loading branch information
leifdenby committed Sep 12, 2024
1 parent 743d7a1 commit ac10d7d
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions neural_lam/datastore/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import abc
import collections
import dataclasses
import functools
from pathlib import Path
from typing import List, Union

Expand Down Expand Up @@ -300,6 +301,7 @@ def get_xy(self, category: str, stacked: bool) -> np.ndarray:
"""
pass

@functools.lru_cache
def get_xy_extent(self, category: str) -> List[float]:
"""
Return the extent of the x, y coordinates for a given category of data.
Expand Down

0 comments on commit ac10d7d

Please sign in to comment.