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

simplification of np.array(set(labels)) #4119

Merged
merged 1 commit into from
Oct 2, 2022

Conversation

mireianievas
Copy link
Contributor

@mireianievas mireianievas commented Sep 30, 2022

Simplification of unique_labels using np.unique instead of sets. Avoids calling again the conversion to np.array at the end of the function.

Description

This pull request was suggested in issue #4117

Simplification of unique_labels using np.unique instead of sets. Avoids calling again the conversion to np.array at the end of the function.
@codecov
Copy link

codecov bot commented Oct 1, 2022

Codecov Report

Merging #4119 (811fc97) into master (d0ef0e2) will not change coverage.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##           master    #4119   +/-   ##
=======================================
  Coverage   93.44%   93.44%           
=======================================
  Files         164      164           
  Lines       21897    21897           
=======================================
  Hits        20461    20461           
  Misses       1436     1436           
Impacted Files Coverage Δ
gammapy/maps/axes.py 91.43% <100.00%> (ø)

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@adonath adonath self-assigned this Oct 2, 2022
@adonath adonath added this to the 1.0 milestone Oct 2, 2022
Copy link
Member

@adonath adonath left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot @mireianievas for the simplification here!

@adonath adonath merged commit 20d1a3c into gammapy:master Oct 2, 2022
@mireianievas mireianievas deleted the patch-1 branch October 3, 2022 08:29
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.

2 participants