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

do not save empty arrays #489

Merged
merged 1 commit into from
Oct 28, 2020
Merged

do not save empty arrays #489

merged 1 commit into from
Oct 28, 2020

Conversation

plakrisenko
Copy link
Member

No description provided.

@dweindl
Copy link
Member

dweindl commented Oct 28, 2020

Codacy Here is an overview of what got changed by this pull request:

Complexity increasing per file
==============================
- pypesto/store/save_to_hdf5.py  1
         

See the complete overview on Codacy

@@ -59,7 +59,9 @@ def write(self, problem, overwrite: bool = False):
for problem_attr in attrs_to_save:
value = getattr(problem, problem_attr)
if isinstance(value, (list, np.ndarray)):
write_array(problem_grp, problem_attr, value)
Copy link
Member Author

Choose a reason for hiding this comment

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

in case of an empty array the first condition in the if statement of write_array will be true, so all empty ones will be saved as int arrays. This messes up shape for example.

Copy link
Member

@LeonardSchmiester LeonardSchmiester left a comment

Choose a reason for hiding this comment

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

👍

@plakrisenko plakrisenko merged commit 9c355f7 into develop Oct 28, 2020
@plakrisenko plakrisenko deleted the storage_fix branch November 4, 2020 18:07
@yannikschaelte yannikschaelte mentioned this pull request Jan 19, 2021
m-philipps pushed a commit that referenced this pull request Jun 14, 2022
* Prettify reaction arrows

* added Erikas comments

* Simons comments

* Highlight URLs in pdf

* chmod +x compile_tutorial.sh

* rewrap, typo

Co-authored-by: LeonardSchmiester <leonard.schmiester@helmholtz-muenchen.de>
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.

3 participants