Skip to content

Commit

Permalink
BUG: fix caching error with UnitRegistry.modify
Browse files Browse the repository at this point in the history
  • Loading branch information
neutrinoceros committed Nov 11, 2023
1 parent 99cf350 commit 2aee0fc
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions unyt/unit_registry.py
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,8 @@ def modify(self, symbol, base_value):
new_dimensions = self.lut[symbol][1]

self.lut[symbol] = (float(base_value), new_dimensions) + self.lut[symbol][2:]
if symbol in self._unit_object_cache:
self._unit_object_cache.pop(symbol)

def keys(self):
"""
Expand Down

0 comments on commit 2aee0fc

Please sign in to comment.