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

BUG: Saving and loading None values #199

Merged
merged 6 commits into from
Jun 23, 2021

Conversation

scottclowe
Copy link
Member

When a variable set to None is saved to an npz file, it gets turned into numpy.ndarray. We now turn np.array(None) back into None when loading it, and also don't save None values to the npz files any more.

This was found when trying to save the matfile for results that had been loaded from cache for the functional notebook #169, so I added a unit test to catch this error.

@codecov
Copy link

codecov bot commented Jun 23, 2021

Codecov Report

Merging #199 (e0ba45c) into master (e4972a9) will increase coverage by 0.02%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #199      +/-   ##
==========================================
+ Coverage   93.06%   93.09%   +0.02%     
==========================================
  Files           8        8              
  Lines         909      912       +3     
  Branches      188      189       +1     
==========================================
+ Hits          846      849       +3     
  Misses         32       32              
  Partials       31       31              
Flag Coverage Δ
nbsmoke 63.92% <50.00%> (-0.11%) ⬇️
unittests 92.98% <100.00%> (+0.02%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
fissa/core.py 96.64% <100.00%> (+0.03%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e4972a9...e0ba45c. Read the comment docs.

@scottclowe scottclowe merged commit 726a4ef into rochefort-lab:master Jun 23, 2021
@scottclowe scottclowe deleted the bug_matfile-from-cache branch June 23, 2021 10:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant