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

vlsvReader get_variable_length consolidation #249

Open
alhom opened this issue Jun 19, 2024 · 1 comment
Open

vlsvReader get_variable_length consolidation #249

alhom opened this issue Jun 19, 2024 · 1 comment

Comments

@alhom
Copy link
Contributor

alhom commented Jun 19, 2024

Several functions use a test-variable read or such to check the length of a variable (1 for scalar, n for n-vector..). This is not entirely trivial when accounting for numpy maskedarrays:
#247

There exists a function that checks the vector length from file reads:

def read_variable_vectorsize(self, name):

Consolidating such checks to a single function, with datareducer support, and applying that function wherever required would do good.

@alhom
Copy link
Contributor Author

alhom commented Jun 19, 2024

Pythonic exception handling such as try len() except len=1 might be good solution.

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

No branches or pull requests

1 participant