-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refactor Codebase by Removing Obsolete Functionality due to Introducing Efficient Compute Functions #2229
Conversation
3d59f03
to
1b3d63c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you tweak this to not change the spacing in the docstrings for create_partial
and execute
Signed-off-by: ashmeigh <[email protected]>
ac5d17f
to
4ddad2b
Compare
from collections.abc import Callable | ||
from numpy import ndarray # Import ndarray type from numpy |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should stay inside the if TYPE_CHECKING:
if ndarray
is only used here for type annotations
Signed-off-by: ashmeigh <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Test operations and recon.
Thanks. Good to see these removed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One more thing, could you add a release note to say that this removes shared.execute and associated functions.
Signed-off-by: ashmeigh <[email protected]>
Description
This pull request proposes the removal of specific functions and a type alias from our project that have become redundant due to the introduction of more modern and efficient compute functions. This change aims to enhance system performance and code maintainability.
Functions Removed
inplace2(func, data, i, **kwargs)
: Executesfunc
in-place on two elements fromdata
at indexi
. It's typically used for operations that modify these elements based on each other.inplace1(func, data, i, **kwargs)
: Appliesfunc
directly to a single element at indexi
indata
. This is used for simple, direct modifications of individual items.return_to_self(func, data, i, **kwargs)
: Appliesfunc
to an element at indexi
and updates that same element with the result. It ensures the transformation of individual data points while maintaining their position in the array.inplace_second_2d(func, data, i, **kwargs)
: Usesfunc
to modify an element at indexi
in one dataset and a whole 2D array in another. This is useful for updating 2D data based on specific 1D index-related values.return_to_second_at_i(func, data, i, **kwargs)
: Executesfunc
on an element at indexi
from one dataset and stores the result at the same index in a second dataset. It is ideal for operations where outputs are mapped directly to another data structure.Testing
Extensive testing has confirmed that these changes do not negatively impact our operations. All tests have been updated to align with the new system, ensuring that it performs reliably and efficiently.
Acceptance Criteria
Documentation
The documentation has been updated to reflect these changes. All relevant modifications have been documented in the appropriate file in
docs/release_notes
.