@@ -171,7 +171,7 @@ First, add the code line to calculate a mean along a specified axis.
171
171
172
172
``` python
173
173
def mean_mm_to_in (data_mm , axis_value ):
174
- mean_data_mm = np.mean(data_mm, axis = axis_value)
174
+ mean_data_mm = np.mean(data_mm, axis = axis_value)
175
175
```
176
176
177
177
@@ -180,7 +180,7 @@ Next, add the code line to convert the mean array from millimeters to inches. In
180
180
181
181
``` python
182
182
def mean_mm_to_in (data_mm , axis_value ):
183
- mean_data_mm = np.mean(data_mm, axis = axis_value)
183
+ mean_data_mm = np.mean(data_mm, axis = axis_value)
184
184
mean_data_in = mean_data_mm / 25.4
185
185
186
186
return mean_data_in
@@ -211,7 +211,7 @@ def mean_mm_to_in(data_mm, axis_value):
211
211
numpy array
212
212
Mean values of input array in inches.
213
213
"""
214
- mean_data_mm = np.mean(data_mm, axis = axis_value)
214
+ mean_data_mm = np.mean(data_mm, axis = axis_value)
215
215
return mean_data_mm / 25.4
216
216
```
217
217
@@ -235,16 +235,16 @@ precip_2002_2013_mm = np.array([[27.178, 11.176, 38.1, 5.08, 81.28, 29.972,
235
235
236
236
``` python
237
237
# Calculate monthly mean (inches) for precip_2002_2013
238
- monthly_mean_in = mean_mm_to_in(data_mm = precip_2002_2013_mm,
239
- axis_value = 0 )
238
+ monthly_mean_in = mean_mm_to_in(data_mm = precip_2002_2013_mm,
239
+ axis_value = 0 )
240
240
241
241
monthly_mean_in
242
242
```
243
243
244
244
``` python
245
245
# Calculate yearly mean (inches) for precip_2002_2013
246
- yearly_mean_in = mean_mm_to_in(data_mm = precip_2002_2013_mm,
247
- axis_value = 1 )
246
+ yearly_mean_in = mean_mm_to_in(data_mm = precip_2002_2013_mm,
247
+ axis_value = 1 )
248
248
249
249
yearly_mean_in
250
250
```
0 commit comments