pizzarr icon indicating copy to clipboard operation
pizzarr copied to clipboard

Orthogonal selection

Open Artur-man opened this issue 1 year ago • 2 comments
trafficstars

Summary:

  • OrthogonalIndexer and IntArrayDimIndexer
  • Order class from zarr-python
  • IntDimIndexer (may need some work)
  • Future work: BoolArrayDimIndexer
  • update normalization for integer vectors
  • add methods for int and zb_int (are these needed?), currently implemented but not used ...
  • zero_based_to_one_based function now also applies to none slice selections
  • [.ZarrArray triggers orthogonal selection only (or should it?)
  • add tests for orthogonal selection

Relevant Issues: #107 #104 #97 #43

Artur-man avatar Sep 03 '24 19:09 Artur-man

Here it is, tested a bunch of times but who knows :D Let me know what you guys think and lets review if you want.

Artur-man avatar Sep 03 '24 19:09 Artur-man

Commented out exported functions under int.R to let pkgdown do its thing ... although I am not sure if int() or zb_int() are indeed needed.

Artur-man avatar Sep 07 '24 20:09 Artur-man

I had to do some internal changes to is_integer and is_integer_vec 3fa0a47d82aabbfcf8d585a3f51f5ca0809b8277

The previous implementation of is_integer was not behaving as the one in zarr-python. This is because R also returns TRUE for full integer vectors when is_integer is called, thus one should check the length too.

Thus now the function checks the length as well, similar modifications are done to is_integer_vec as well. Now the Indexer classes are more comparable to the zarr-python.

Artur-man avatar Oct 20 '24 10:10 Artur-man

pkgdown should be fixed now

Artur-man avatar Oct 24 '24 16:10 Artur-man

Hi @Artur-man this is looking great, thank you for the tests and the comments and the references back to the python code.

I just opened https://github.com/Artur-man/pizzarr/pull/1, can you merge that into your branch, and then I will merge this PR?

keller-mark avatar Oct 24 '24 16:10 keller-mark

just did!!

Artur-man avatar Oct 24 '24 17:10 Artur-man