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

[FIX] Fix deepcopy and pickle for classes derived from np.ndarray #5536

Merged
merged 2 commits into from
Aug 6, 2021

Conversation

janezd
Copy link
Contributor

@janezd janezd commented Jul 27, 2021

Issue

Fixes #5480.

Description of changes

Apparently and hopefully, the only classes derived from np.ndarray are distribution.Discrete, distribution.Continuous, contingency.Discrete and DistMatrix. The latter was already properly subclassed, so I did the same in the first three.

DistMatrix also implements __array_wrap__; I haven't added it to the former three classes because it would change their behaviour and possible break some code without (much, if any) benefit.

Includes
  • Code changes
  • Tests

@codecov
Copy link

codecov bot commented Jul 27, 2021

Codecov Report

Merging #5536 (41413ad) into master (f9d78d6) will decrease coverage by 0.00%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master    #5536      +/-   ##
==========================================
- Coverage   86.38%   86.38%   -0.01%     
==========================================
  Files         304      304              
  Lines       61753    61773      +20     
==========================================
+ Hits        53344    53360      +16     
- Misses       8409     8413       +4     

@janezd janezd changed the title Fix deepcopy and pickle for classes derived from np.ndarray [FIX] Fix deepcopy and pickle for classes derived from np.ndarray Aug 1, 2021
@VesnaT VesnaT merged commit 376530d into biolab:master Aug 6, 2021
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.

Random: Cannot copy model with Impute preprocessor
2 participants