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.

Confusion about the dimension_separator keyword

See original GitHub issue

I don’t really understand how to use the new dimension_separator keyword, in particular:

  1. Creating a DirectoryStore(dimension_separator="/") does not have the effect I would expect (see code and problem description below).
  2. Why does zarr still have the NestedDirectoryStore? Shouldn’t it be the same as DirectoryStore(dimension_separator="/")? Hence I would assume that NestedDirectoryStore could either be removed or (if to be kept for legacy purposes) should just map to DirectoryStore(dimension_seperator="/").

Minimal, reproducible code sample, a copy-pastable example if possible

import zarr
store = zarr.DirectoryStore("test.zarr", dimension_separator="/")
g = zarr.open(store, mode="a")
ds = g.create_dataset("test", shape=(10, 10, 10))
ds[:] = 1

Problem description

Now, I would assume that the chunks are nested, but I get:

$ ls test.zarr/test
0.0.0

but to, to my confusion, also this:

$ cat test.zarr/test/.zarray
...
"dimension_separator": "/",
...

If I use NestedDirectoryStore instead, the chunks are nested as expected.

Version and installation information

Please provide the following:

  • Value of zarr.__version__: 2.8.3
  • Value of numcodecs.__version__: 0.7.3
  • Version of Python interpreter: 3.8.6
  • Operating system: Linux
  • How Zarr was installed: using conda

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:39 (31 by maintainers)

github_iconTop GitHub Comments

2reactions
joshmoorecommented, Aug 19, 2021

After a lengthy back and forth, I think this is a last call for opinions on the fix. I’d propose to get it out in 2.9.0 (noting that that also drops support for Python 3.6)

2reactions
thewtexcommented, Aug 11, 2021

Another +1 and thanks to @joshmoore for #773, which addressed the behavior I observed when trying to use DirectoryStore and dimension_separator='/' with zarr and xarray.

Are there plans to integrate #773?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Approved Word Separators in URLs | SEO Forum - Moz
Hi There, We are in the process of revamping our URL structure and my devs tell me they have a technical problem using...
Read more >
SQL naming standards | Towards Data Science
Having keywords in lowercase is quicker to type, and easier to read. ... PascalCase (all words in title case, no separator).
Read more >
Add comma to drawing dimension - 10000 instead of 10000
I want the dimensions in a drawing to have a comma to divide up the. ... The "system separator for dimensions" only seems...
Read more >
Filter and pattern syntax - Amazon CloudWatch Logs
Dimensions are name/value value pairs and only available for JSON and space-delimited filter patterns. You can create JSON and space-delimited metric filters ...
Read more >
matrix - Fortran, 'dim' argument of 'size' intrinsic is not a valid ...
The array arr is declared as being of rank 1. So, assuming the compiler is pointing to the line where size(arr,2) is given,...
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