Skip to content

Conversation

@Hasan-8326
Copy link

This pull request fixes an issue where adding a pandas.Timedelta to a datetime feature (e.g., f + pd.Timedelta(1, 'y')) raised an AssertionError in Featuretools. The root cause was that the AddNumericScalar primitive only supported numeric addition and did not handle datetime + timedelta operations. This update enhances AddNumericScalar to support both numeric and datetime inputs, allowing datetime features to be correctly offset by pandas.Timedelta values. The change maintains backward compatibility with numeric features and ensures that time-based arithmetic works as expected in feature definitions.

@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

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.

3 participants