Skip to content

Conversation

@Nithurshen
Copy link
Contributor

@Nithurshen Nithurshen commented Nov 9, 2025

This PR fixes a bug where pd.interval_range would incorrectly infer an integer dtype when one of the inputs (e.g., start) was a np.float32 and other inputs (e.g., end, freq) were integers. This resulted in a loss of precision.

New Output

Pandas Version:  3.0.0.dev0+2592.gea75dd7b3b
IntervalIndex([(0.0, 1.0], (1.0, 2.0]], dtype='interval[float64, right]')

@Nithurshen Nithurshen requested a review from mroeschke November 11, 2025 00:51
@WillAyd WillAyd dismissed mroeschke’s stale review November 18, 2025 14:17

matt on vacation - this looks good

@WillAyd WillAyd merged commit c6ca221 into pandas-dev:main Nov 18, 2025
41 checks passed
@Nithurshen Nithurshen deleted the fix-interval_range-dtype branch November 18, 2025 14:21
mittal-aakriti pushed a commit to mittal-aakriti/pandas that referenced this pull request Nov 19, 2025
mittal-aakriti pushed a commit to mittal-aakriti/pandas that referenced this pull request Nov 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

BUG: interval_range ignores type of start (regression from pandas 2.2.2)

3 participants