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

Refactor save/load 1d #115

Closed
fzeiser opened this issue Mar 19, 2020 · 1 comment
Closed

Refactor save/load 1d #115

fzeiser opened this issue Mar 19, 2020 · 1 comment
Assignees
Labels
Suggestion Suggestion for new feature/changes

Comments

@fzeiser
Copy link
Collaborator

fzeiser commented Mar 19, 2020

Working on percistency for some classes, and looking through this realized that the Vectors are saved as a one column vector, appending values and energies. I think this is rather ugly, much easier if we have two columns, energy and values.

ompy/ompy/filehandling.py

Lines 266 to 270 in 77e30bf

def save_numpy_1D(values: np.ndarray, E: np.ndarray,
path: Union[str, Path]) -> None:
mat = np.append(values, E)
assert mat.size % 2 == 0
np.save(path, mat)

@vetlewi : Do you by any chance use save/load already? I don't want to break your code ;P, but otherwise I'd like to change it. It's not really important, but still 😄

@fzeiser fzeiser added the Suggestion Suggestion for new feature/changes label Mar 19, 2020
@fzeiser fzeiser self-assigned this Mar 19, 2020
@vetlewi
Copy link
Collaborator

vetlewi commented Mar 19, 2020

I don't think so, no.

fzeiser pushed a commit that referenced this issue Mar 27, 2020
Tought I made a column stack, but it turns out that `hstack` and `vstack` didn't do what I want :/.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Suggestion Suggestion for new feature/changes
Projects
None yet
Development

No branches or pull requests

2 participants