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

Return a copy of the array for detector_key.train_id_coordinates() #502

Merged
merged 1 commit into from Mar 21, 2024

Conversation

takluyver
Copy link
Member

So that modifying the returned array doesn't affect the internals of the detector data objects.

This also means the .train_id_coordinates() method will consistently return a NumPy array - previously for JUNGFRAU it would have been a list. That's technically an API break, but I think the consistency is worth it.

cc @turkot - I spotted this while looking at the code to answer your question.

@takluyver takluyver added this to the 1.17 milestone Mar 20, 2024
@philsmt
Copy link
Contributor

philsmt commented Mar 20, 2024

I would say .train_id_coordinates() returning a list was a bug, given all other instances of this method in EXtra-data return ndarray (or pd.Series).

LGTM

@turkot
Copy link
Contributor

turkot commented Mar 20, 2024

Thank you Thomas, I agree that consistency has higher priority.

@takluyver
Copy link
Member Author

Thanks both!

@takluyver takluyver merged commit a8ef418 into master Mar 21, 2024
9 of 10 checks passed
@takluyver takluyver deleted the multimod-train-coord-copy branch March 21, 2024 08:38
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.

None yet

3 participants