Skip to content

Conversation

@natmokval
Copy link
Contributor

@natmokval natmokval commented Nov 17, 2025

@natmokval natmokval marked this pull request as draft November 17, 2025 22:56
@natmokval natmokval added Timedelta Timedelta data type Numeric Operations Arithmetic, Comparison, and Logical operations labels Nov 17, 2025
@jbrockmendel
Copy link
Member

This is t already disallowed?

@natmokval
Copy link
Contributor Author

natmokval commented Nov 18, 2025

This is t already disallowed?

@jbrockmendel, thank you for taking a look at this PR.

Yes, it's correct, it is disallowed. I thought we wanted to improve the error message. Did I get your comment #62316 (comment) wrong?

Maybe I should rename my PR to "ENH: clarify error message …"

Update: renamed it

@natmokval natmokval changed the title BUG: Disallow multiplication of bool times Timedelta ENH: clarify error message when multiplying bool times Timedelta Nov 18, 2025
# GH#62316
raise TypeError(
"Cannot multiply Timedelta by bools. "
"Explicitly cast to integers instead."
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

bool and integer singular

@jbrockmendel
Copy link
Member

can you add a test

@jbrockmendel
Copy link
Member

BTW there are a few issues with the "Numeric Operations" label and "MultiIndex" label about silent alignment on arithmetic between Series/Frame with non-aligned MultiIndexes. While looking at them the other day I thought that might be a good topic for you to tackle.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Numeric Operations Arithmetic, Comparison, and Logical operations Timedelta Timedelta data type

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants