Pandas version checks

  • [x] I have checked that this issue has not already been reported.

  • [x] I have confirmed this bug exists on the latest version of pandas.

  • [x] I have confirmed this bug exists on the main branch of pandas.

Reproducible Example

import datetime as dt
import pandas as pd
dt.timedelta(days=1) * True  #  Works
pd.Timedelta("1 day") * True  # Fails in 2.3.2 and in main
pd.Series([True, False]) * pd.timedelta_range(start="1 day", end="2 days")  # Works in 2.3.2, fails in main

Issue Description

See above. Multiplying a bool times a Timedelta is inconsistent.

In version 2.3.2, you can't multiply a single bool and a pd.Timedelta object, but you can multiply them if they are in a Series.

In main ('3.0.0.dev0+2389.g452c7fb6a4'), you cannot multiply when in a Series.

Note that using datetime.timedelta, you can multiply a boolean with a Timedelta

Expected Behavior

I think multiplication of a Timedelta times a bool should work like it does for datetime.timedelta

Installed Versions

INSTALLED VERSIONS ------------------ commit : 452c7fb6a4d089e6fecf81bbbd4ad056ce508e22 python : 3.11.13 python-bits : 64 OS : Windows OS-release : 10 Version : 10.0.26100 machine : AMD64 processor : Intel64 Family 6 Model 183 Stepping 1, GenuineIntel byteorder : little LC_ALL : None LANG : None LOCALE : English_United States.1252 pandas : 3.0.0.dev0+2389.g452c7fb6a4 numpy : 2.3.3 dateutil : 2.9.0.post0 pip : 25.1 Cython : None sphinx : None IPython : None adbc-driver-postgresql: None adbc-driver-sqlite : None bs4 : 4.13.5 bottleneck : None fastparquet : None fsspec : None html5lib : 1.1 hypothesis : None gcsfs : None jinja2 : 3.1.6 lxml.etree : 6.0.1 matplotlib : 3.10.6 numba : None numexpr : 2.12.1 odfpy : None openpyxl : 3.1.5 psycopg2 : None pymysql : None pyarrow : 21.0.0 pyiceberg : None pyreadstat : 1.3.1 pytest : N/A python-calamine : None pytz : 2025.2 pyxlsb : 1.0.10 s3fs : None scipy : 1.16.1 sqlalchemy : 2.0.43 tables : 3.10.2 tabulate : 0.9.0 xarray : 2025.9.0 xlrd : 2.0.2 xlsxwriter : 3.2.5 zstandard : 0.24.0 qtpy : None pyqt5 : None

Comment From: Dr-Irv

@jbrockmendel I assigned to you - not sure if that is correct or not.

Comment From: jbrockmendel

We disabled that intentionally in #62248

Comment From: Dr-Irv

We disabled that intentionally in #62248

OK, but does it make sense that we can multiply dt.timedelta and bool, but not pd.Timedelta and bool ??

Comment From: jbrockmendel

i think it doesn't make sense that dt.timedelta*bool works.

Comment From: Dr-Irv

i think it doesn't make sense that dt.timedelta*bool works.

Well, we're then inconsistent with numpy as well:

>>> import numpy as np
>>> np.timedelta64(1, "D") * True
np.timedelta64(1,'D')
>>> np.timedelta64(1, "D") * False
np.timedelta64(0,'D')

My sense here is that if both python and numpy are supporting multiplying a bool times a timedelta, then pandas should do the same.

Comment From: PluvioXO

I am willing to implement this, will create a PR.