Skip to content

Commit

Permalink
further fix array flattening to be comp. with cdflib 1.3.3
Browse files Browse the repository at this point in the history
  • Loading branch information
jgieseler committed Jan 17, 2025
1 parent 74a3f86 commit f1d4f84
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions seppy/tools/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -675,9 +675,9 @@ def calc_av_en_flux_HET(self, df, energies, en_channel):

# An IndexError here is caused by invalid channel choice
try:
en_channel_string = en_str[en_channel[0]][0].split()[0] + ' - '\
+ en_str[en_channel[-1]][0].split()[2] + ' ' +\
en_str[en_channel[-1]][0].split()[3]
en_channel_string = en_str[en_channel[0]].flat[0].split()[0] + ' - '\
+ en_str[en_channel[-1]].flat[0].split()[2] + ' ' +\
en_str[en_channel[-1]].flat[0].split()[3]

except IndexError:
raise Exception(f"{en_channel} is an invalid channel or a combination of channels!")
Expand Down Expand Up @@ -781,9 +781,9 @@ def calc_av_en_flux_EPT(self, df, energies, en_channel):

# An IndexError here is caused by invalid channel choice
try:
en_channel_string = en_str[en_channel[0]][0].split()[0] + ' - '\
+ en_str[en_channel[-1]][0].split()[2] + ' '\
+ en_str[en_channel[-1]][0].split()[3]
en_channel_string = en_str[en_channel[0]].flat[0].split()[0] + ' - '\
+ en_str[en_channel[-1]].flat[0].split()[2] + ' '\
+ en_str[en_channel[-1]].flat[0].split()[3]

except IndexError:
raise Exception(f"{en_channel} is an invalid channel or a combination of channels!")
Expand Down

0 comments on commit f1d4f84

Please sign in to comment.