Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix audformat.utils.hash() for pandas>=2.1.0
Browse files Browse the repository at this point in the history
hagenw committed Oct 10, 2023
1 parent 7186305 commit 7c6033b
Showing 2 changed files with 7 additions and 2 deletions.
7 changes: 6 additions & 1 deletion audformat/core/utils.py
Original file line number Diff line number Diff line change
@@ -546,7 +546,12 @@ def hash(
'5251663970176285425'
"""
return str(pd.util.hash_pandas_object(obj).sum())
# Convert to int64
# to enforce same behavior
# across different pandas versions,
# see
# https://github.com/pandas-dev/pandas/issues/55452
return str(pd.util.hash_pandas_object(obj).astype('int64').sum())


def index_has_overlap(
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -37,7 +37,7 @@ dependencies = [
'iso3166',
'oyaml',
'pyyaml >=5.4.1',
'pandas >=1.4.1,<2.1.0',
'pandas >=1.4.1',
]
# Get version dynamically from git
# (needs setuptools_scm tools config below)

0 comments on commit 7c6033b

Please sign in to comment.