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

add serialization #56

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

pkspyder007
Copy link

Description

Added serialization for NMatrix class using Marshal module and custom implementation of load and dump functions.
Default Marshal serialization methods threw error so We needed to create our own serialization/deserialization strategies.
nm_int is the default fallback for dtype if it's not nm_float64 or nm_bool

Closes #35

(Explain how this PR changes numruby.)
This PR adds the ability for NMatrix to serialize the class objects which can be used to store the data in a file for future and to pass it between different processes and to be utilized

Test Plan

the test is written for comparing the original object and the one after serialization and deserialization
it checks for nm_float64, nm_int, and nm_bool dtypes

@prasunanand
Copy link
Member

@pkspyder007 CI is failing. Can you debug ?

@pkspyder007
Copy link
Author

@prasunanand According to my checking ,CI is failing due to the bundler version compatibility. Adding a Gemlock file similar to package.lock in npm should lock all the version of gems and bundler we are using.

@pkspyder007
Copy link
Author

@prasunanand If I add the Gemfile.lock the 5th test passes but the travis CI build fails and on removing Gemfile.lock the 5th test fails. You can see the result here
I read the error message in Travis build log I think the Issue is only with versions that we use of bundler and ruby.
So this would be a tradeoff between keeping the lock file vs not.

@pkspyder007
Copy link
Author

@prasunanand @Uditgulati Any updates on this PR?

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.

Add NMatrix serialization support
2 participants