public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Filipe Rosset <rosset.filipe@gmail.com>
To: git-commits@fedoraproject.org
Subject: [rpms/python-xarray] rawhide: Fix OverflowError under NumPy 2.0+ when multiplying np.iinfo(int64).min with timedelta64
Date: Sat, 01 Aug 2026 18:39:56 GMT [thread overview]
Message-ID: <178560959677.1.14678711048120075177.rpms-python-xarray-dd3b5db0b1cc@fedoraproject.org> (raw)
A new commit has been pushed.
Repo : rpms/python-xarray
Branch : rawhide
Commit : dd3b5db0b1cc6caac521c20eb6a445010383820b
Author : Filipe Rosset <rosset.filipe@gmail.com>
Date : 2026-07-28T18:15:58-03:00
Stats : +24/-0 in 2 file(s)
URL : https://src.fedoraproject.org/rpms/python-xarray/c/dd3b5db0b1cc6caac521c20eb6a445010383820b?branch=rawhide
Log:
Fix OverflowError under NumPy 2.0+ when multiplying np.iinfo(int64).min with timedelta64
Resolves: rhbz#2504597
---
diff --git a/0003-xarray-numpy2-overflow.patch b/0003-xarray-numpy2-overflow.patch
new file mode 100644
index 0000000..2969d0c
--- /dev/null
+++ b/0003-xarray-numpy2-overflow.patch
@@ -0,0 +1,22 @@
+Fix OverflowError under NumPy 2.0+ when multiplying np.iinfo(int64).min with timedelta64
+
+--- a/xarray/coding/times.py
++++ b/xarray/coding/times.py
+@@ -390,6 +390,8 @@
+ date, unit: NPDatetimeUnitOptions, ref_date: pd.Timestamp
+ ) -> pd.Timestamp:
+ # check for out-of-bounds floats and raise
++ if date == np.iinfo("int64").min:
++ return pd.Timestamp("NaT")
+ if date > np.iinfo("int64").max or date < np.iinfo("int64").min:
+ raise OutOfBoundsTimedelta(
+ f"Value {date} can't be represented as Datetime/Timedelta."
+@@ -411,6 +413,8 @@
+
+
+ def _check_timedelta_range(value, data_unit, time_unit):
++ if value == np.iinfo("int64").min:
++ return
+ if value > np.iinfo("int64").max or value < np.iinfo("int64").min:
+ OutOfBoundsTimedelta(f"Value {value} can't be represented as Timedelta.")
+ # on windows multiplying nan leads to RuntimeWarning
diff --git a/python-xarray.spec b/python-xarray.spec
index 407d936..c4cd7dd 100644
--- a/python-xarray.spec
+++ b/python-xarray.spec
@@ -19,6 +19,8 @@ Source: %pypi_source %{srcname}
Patch: 0001-Drop-pydap-from-dependencies.patch
# Fix failures with latest dependencies.
Patch: https://github.com/pydata/xarray/pull/11204.patch
+# Fix OverflowError under NumPy 2.0+ when date is np.iinfo(int64).min
+Patch: 0003-xarray-numpy2-overflow.patch
BuildArch: noarch
reply other threads:[~2026-08-01 18:39 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=178560959677.1.14678711048120075177.rpms-python-xarray-dd3b5db0b1cc@fedoraproject.org \
--to=rosset.filipe@gmail.com \
--cc=git-commits@fedoraproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox