Skip to content

Commit

Permalink
Merge pull request #214 from MichaelTiemannOSC/issue_213
Browse files Browse the repository at this point in the history
Explicitly declare `units` field in PintType
  • Loading branch information
andrewgsavage authored Jan 13, 2024
2 parents 94975eb + c5c7d8c commit 5f4c39d
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pint_pandas/pint_array.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import re
import warnings
from importlib.metadata import version
from typing import Optional

import numpy as np
import pandas as pd
Expand Down Expand Up @@ -43,6 +44,7 @@ class PintType(ExtensionDtype):
# str = '|O08'
# base = np.dtype('O')
# num = 102
units: Optional[_Unit] = None # Filled in by `construct_from_..._string`
_metadata = ("units",)
_match = re.compile(r"(P|p)int\[(?P<units>.+)\]")
_cache = {}
Expand Down

0 comments on commit 5f4c39d

Please sign in to comment.