Skip to content

Conversation

@nstarman
Copy link
Contributor

No description provided.

@nstarman nstarman added this to the v0.23.0 milestone Sep 29, 2025
@nstarman nstarman changed the title WIP [WIP] ops refactor Sep 29, 2025
@nstarman
Copy link
Contributor Author

@adrn, this is a start towards the refactor we discussed.

@nstarman nstarman force-pushed the ops/refactor branch 2 times, most recently from 72d50c7 to e985e5f Compare September 30, 2025 04:38
@AbstractOperator.__call__.dispatch # type: ignore[misc]
def call(self: AbstractOperator, x: Coordinate, /) -> Coordinate:
@dispatch
def operate(self: AbstractOperator, obj: Coordinate, /) -> Coordinate:
Copy link
Contributor

Choose a reason for hiding this comment

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

Nice! I think we discussed having the "root" operate implementation be:

def operate(cls, params, tau, obj):

where tau is the "proper time" and it's implemented in class method form. But maybe it's possible to implement as a method / replacement of the current __call__ mechanism? Either way, I think the default should take (tau, obj) and there should be a dispatch when only obj is passed like:

def operate(cls, params, obj):
    return operate(cls, params, None, obj)

Thoughts?

@nstarman nstarman force-pushed the ops/refactor branch 2 times, most recently from b357925 to 1cf96f6 Compare October 4, 2025 22:23
Signed-off-by: nstarman <[email protected]>
Signed-off-by: nstarman <[email protected]>
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.

2 participants