@@ -14,7 +14,7 @@ def test_psp_load_online():
14
14
enddate = "2021/06/01" , path = None , resample = "1min" )
15
15
assert isinstance (df , pd .DataFrame )
16
16
assert df .shape == (48 , 136 )
17
- assert meta ['H_ENERGY_LABL' ][ 0 ] [0 ] == ' 6.7 - 8.0 MeV'
17
+ assert meta ['H_ENERGY_LABL' ]. flatten () [0 ] == ' 6.7 - 8.0 MeV'
18
18
# Check that fillvals are replaced by NaN
19
19
assert np .sum (np .isnan (df ['B_H_Uncertainty_14' ])) == 48
20
20
#
@@ -102,7 +102,7 @@ def test_stereo_het_load_online():
102
102
path = None , resample = "1min" , pos_timestamp = 'center' )
103
103
assert isinstance (df , pd .DataFrame )
104
104
assert df .shape == (1440 , 28 )
105
- assert meta ['Proton_Bins_Text' ][ 0 ] [0 ] == '13.6 - 15.1 MeV '
105
+ assert meta ['Proton_Bins_Text' ]. flatten () [0 ] == '13.6 - 15.1 MeV '
106
106
assert np .sum (np .isnan (df ['Electron_Flux_0' ])) == 0
107
107
108
108
@@ -114,7 +114,7 @@ def test_stereo_het_load_offline():
114
114
path = path , resample = "1min" , pos_timestamp = None )
115
115
assert isinstance (df , pd .DataFrame )
116
116
assert df .shape == (1440 , 28 )
117
- assert meta ['Proton_Bins_Text' ][ 0 ] [0 ] == '13.6 - 15.1 MeV '
117
+ assert meta ['Proton_Bins_Text' ]. flatten () [0 ] == '13.6 - 15.1 MeV '
118
118
assert np .sum (np .isnan (df ['Electron_Flux_0' ])) == 0
119
119
120
120
@@ -150,7 +150,7 @@ def test_wind3dp_load_online():
150
150
path = None )
151
151
assert isinstance (df , pd .DataFrame )
152
152
assert df .shape == (2880 , 76 )
153
- assert meta ['FLUX_LABELS' ][ 0 ] [0 ] == 'ElecNoFlux_Ch1_Often~27keV '
153
+ assert meta ['FLUX_LABELS' ]. flatten () [0 ] == 'ElecNoFlux_Ch1_Often~27keV '
154
154
# Check that fillvals are replaced by NaN
155
155
assert np .sum (np .isnan (df ['FLUX_E0' , 'FLUX_E0_P0' ])) == 169
156
156
@@ -167,6 +167,6 @@ def test_wind3dp_load_offline():
167
167
path = path )
168
168
assert isinstance (df , pd .DataFrame )
169
169
assert df .shape == (897 , 15 )
170
- assert meta ['FLUX_LABELS' ][ 0 ] [0 ] == 'ElecNoFlux_Ch1_Often~27keV '
170
+ assert meta ['FLUX_LABELS' ]. flatten () [0 ] == 'ElecNoFlux_Ch1_Often~27keV '
171
171
# Check that fillvals are replaced by NaN
172
172
assert np .sum (np .isnan (df ['FLUX_0' ])) == 352
0 commit comments