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

Option to squeeze singleton dimensions #467

Open
bekozi opened this issue Oct 26, 2017 · 0 comments
Open

Option to squeeze singleton dimensions #467

bekozi opened this issue Oct 26, 2017 · 0 comments

Comments

@bekozi
Copy link
Contributor

bekozi commented Oct 26, 2017

Add option to squeeze singleton dimensions following a slice. This could also apply to processing data with a singleton dimension in general. Right now, the singleton dimension is left in to maintain the source value and/or original data shape.

One possible approach:

ops = ocgis.OcgOperations(..., squeeze_options={'slicing': True, 'as_dimensionless': True, 'reshape': False})

Documentation:

  • slicing :: If True, squeeze singleton dimension following a slice.
  • as_dimensionless :: If True and the dimension has an associated coordinate variable, convert the coordinate variable to a dimensionless, single-valued variable. Otherwise, leave the coordinate variable as is.
  • reshape :: If True, squeeze variable dimensions if they are singleton respecting as_dimensionless.

Ping @nkadygrov.

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