question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Automatic chunking of arrays ?

See original GitHub issue

Hi there,

Hopefully this turns out to be a basic issue, but I was wondering why the chunks='auto' that dask seems to provide (https://docs.dask.org/en/latest/array-chunks.html#automatic-chunking) isn’t an option for xarray? I’m not 100% sure of how dask decides how to automatically chunk its arrays, so maybe there’s a compatibility issue?

I get the impression that the dask method automatically tries to prevent the issues of “too many chunks” or “too few chunks” which can sometimes happen when choosing chunk sizes automatically. If so, it would maybe be a useful thing to include in future versions?

Happy to be corrected if I’ve misunderstood something here though, still getting my head around how the dask/xarray compatibility really works…

Cheers!

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:1
  • Comments:11 (11 by maintainers)

github_iconTop GitHub Comments

1reaction
shoyercommented, May 14, 2020

If we think can improve an error message by adding additional context, the right solution is to use raise Exception(...) from original_error: https://stackoverflow.com/a/16414892/809705

On the other hand, if xarray doesn’t have anything more to add on top of the original error message, it is best not to add any wrapper at all. Users will just see the original error from dask.

1reaction
shoyercommented, May 14, 2020

The error message from dask is already pretty descriptive: NotImplementedError: Can not use auto rechunking with object dtype. We are unable to estimate the size in bytes of object data

I don’t think we have much to add on top of that?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Chunks - Dask documentation
Automatic chunking expands or contracts all dimensions marked with "auto" to try to reach chunk sizes with a number of bytes equal to...
Read more >
Chunking an array down to manageable groups
Solved: I have an array of email addresses like this: [ "email@email.com", "another@email.com", "qwerty@abc.com" ] The.
Read more >
Chunked arrays — xtensor documentation - Read the Docs
A solution to this problem is to cut up the large array into many small arrays, called chunks. Not only do the chunks...
Read more >
Chapter 4. How Chunking and Compression Can Help You
Most of the time, chunking will be automatically enabled by using features like compression or marking a dataset as resizable.
Read more >
PHP Implode array chunk automatic? - Stack Overflow
Try using implode + array_map: $array = array ( array(1,2,3), array(4,5,6), array(7,8,9)); $array = implode('|', array_map('implode', ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found