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

Add option for preserving dimensions of length 1 #45

Closed
tlnagy opened this issue Nov 25, 2019 · 0 comments
Closed

Add option for preserving dimensions of length 1 #45

tlnagy opened this issue Nov 25, 2019 · 0 comments

Comments

@tlnagy
Copy link
Owner

tlnagy commented Nov 25, 2019

Currently, we drop all dimensions that have a length of 1:

OMETIFF.jl/src/loader.jl

Lines 150 to 152 in 4adee1a

unused_dims = Tuple(idx for (idx, key) in enumerate(keys(dims)) if dims[idx] == 1)
squeezed_data = dropdims(data; dims=unused_dims)
used_axes = [axes[i] for i in 1:length(axes) if !(i in unused_dims)]

since I originally considered them superfluous, but there could be circumstances when having that information would actually be beneficial, e.g. for saving (see #30) or for verification.

@tlnagy tlnagy closed this as completed in 8a1977b Nov 27, 2019
tlnagy added a commit that referenced this issue Nov 27, 2019
add support for preserving unused dimensions, fixes #45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant