Skip to content

Add other_fields to loader#1694

Open
ykyohei wants to merge 1 commit into
masterfrom
loader_other_fields
Open

Add other_fields to loader#1694
ykyohei wants to merge 1 commit into
masterfrom
loader_other_fields

Conversation

@ykyohei

@ykyohei ykyohei commented Jul 11, 2026

Copy link
Copy Markdown
Contributor

Motivation is to load preprocess archive per observation easily.
The problem was preprocess archive is usually computed per (band, wafer) and each has scalar fields that cannot be concatenated.
One solution was to drop them by drop_fields , but number of fields to drop is large for ISO preprocess archive and it can increase.

This PR adds other_fields of aman.concatenate to loader to 'drop' them all at once or pick 'first'.

- If other_fields='exact' will compare entries in all items
and if they're identical will add it. Otherwise will fail with
a ValueError.
- If other_fields='fail', the function will fail with a ValueError.
- If other_fields='first', the values from the first element
of items will be copied into the output.
- If other_fields='drop', the fields will simply be ignored
(and the output will only contain fields that share the
target axis).

@ykyohei ykyohei requested review from mhasself and mmccrackan July 13, 2026 11:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant