Skip to content

Conversation

deltamarnix
Copy link
Contributor

Based on discussion #49 , we are looking into ways to efficiently write lazy data arrays to disk in ascii format. Our main contestant would be xarray-extras. A package that can handle large data arrays and writes them with a 10x speed increase compared to simple numpy data writing.

@deltamarnix deltamarnix marked this pull request as draft January 3, 2025 14:00
promise.compute()
# we have to open the file again,
# because xarray_extras only allows paths and no file handlers.
with open(file_path, "a") as f:
Copy link
Member

Choose a reason for hiding this comment

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

one option would be to just use pandas to_csv for internal arrays, and accept the performance hit, and advise that for fast IO people should use external arrays. pandas accepts a file handle not only a path. is dask lazy io the reason extras does not? I wonder if extras could support file handle for the numpy-backed array case, then we can still get a speedup.

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.

2 participants