Skip to content

Commit

Permalink
Merge pull request #29 from mschweikardt/main
Browse files Browse the repository at this point in the history
access properties of Lookup object with lower-case identifiers
  • Loading branch information
dreoilin committed Sep 3, 2024
2 parents 9466d9a + 903235a commit ea5915b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/pygmid/Lookup.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ def __load(self, filename):
return None

def __contains__(self, key):
return key in self.__DATA.keys()
return key.upper() in self.__DATA.keys()

def __getitem__(self, key):
"""
Expand All @@ -96,7 +96,7 @@ def __getitem__(self, key):
if key not in self:
raise ValueError(f"Lookup table does not contain this data")

return np.copy(self.__DATA[key])
return np.copy(self.__DATA[key.upper()])

def _modeset(self, outkey, varkey):
"""
Expand Down

0 comments on commit ea5915b

Please sign in to comment.