Skip to content

Commit

Permalink
Refine comment
Browse files Browse the repository at this point in the history
  • Loading branch information
hagenw committed May 27, 2024
1 parent 6c02e1b commit 85af58d
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions audb/core/dependencies.py
Original file line number Diff line number Diff line change
Expand Up @@ -586,9 +586,10 @@ def _set_dtypes(df: pd.DataFrame) -> pd.DataFrame:
with correct dtypes
"""
# Check if we have an old cache,
# by checking the dtype of index,
# which changed to `object` in version 1.7.0
# Check the dtype of index,
# to decide if we need to update dtypes,
# as dtype of index changed to `object`
# in version 1.7.0 of audb.
if df.index.dtype != define.DEPEND_INDEX_DTYPE:
df.index = df.index.astype(define.DEPEND_INDEX_DTYPE, copy=False)
columns = define.DEPEND_FIELD_NAMES.values()
Expand Down

0 comments on commit 85af58d

Please sign in to comment.