Skip to content
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

Feature/SK-852 | Add numpy raw binary helper #608

Merged
merged 3 commits into from
May 17, 2024
Merged

Feature/SK-852 | Add numpy raw binary helper #608

merged 3 commits into from
May 17, 2024

Conversation

Wrede
Copy link
Member

@Wrede Wrede commented May 17, 2024

The default numpyhelper is based on numpy compressed file format (npz). This PR introduces a new helper that enables raw binary file format (.bin) which will be read using either numpy.frombuffer or numpy.fromfile instead of numpy.load.

The helper is called "binaryhelper".

@Wrede Wrede requested a review from ahellander May 17, 2024 06:42
Copy link
Member

@ahellander ahellander left a comment

Choose a reason for hiding this comment

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

Looks good! See comment / question.

@@ -0,0 +1,16 @@
from fedn.utils.helpers.plugins.numpyhelper import Helper
Copy link
Member

Choose a reason for hiding this comment

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

Would it improve readability to do:

from fedn.utils.helpers.plugins.numpyhelper import Helper as NumpyHelper
..
class Helper(NumpyHelper)

?

@Wrede Wrede merged commit 9d7f500 into master May 17, 2024
11 checks passed
@Wrede Wrede deleted the feature/SK-852 branch May 17, 2024 12:32
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