Skip to content

Commit

Permalink
fix a few more spacing style errors
Browse files Browse the repository at this point in the history
  • Loading branch information
willingc authored and lwasser committed Oct 23, 2024
1 parent d64118f commit efefd62
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions code-workflow-logic/python-functions-multi-parameters.md
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ First, add the code line to calculate a mean along a specified axis.

```python
def mean_mm_to_in(data_mm, axis_value):
mean_data_mm = np.mean(data_mm, axis = axis_value)
mean_data_mm = np.mean(data_mm, axis=axis_value)
```


Expand All @@ -180,7 +180,7 @@ Next, add the code line to convert the mean array from millimeters to inches. In

```python
def mean_mm_to_in(data_mm, axis_value):
mean_data_mm = np.mean(data_mm, axis = axis_value)
mean_data_mm = np.mean(data_mm, axis=axis_value)
mean_data_in = mean_data_mm / 25.4

return mean_data_in
Expand Down Expand Up @@ -211,7 +211,7 @@ def mean_mm_to_in(data_mm, axis_value):
numpy array
Mean values of input array in inches.
"""
mean_data_mm = np.mean(data_mm, axis = axis_value)
mean_data_mm = np.mean(data_mm, axis=axis_value)
return mean_data_mm / 25.4
```

Expand All @@ -235,16 +235,16 @@ precip_2002_2013_mm = np.array([[27.178, 11.176, 38.1, 5.08, 81.28, 29.972,

```python
# Calculate monthly mean (inches) for precip_2002_2013
monthly_mean_in = mean_mm_to_in(data_mm = precip_2002_2013_mm,
axis_value = 0)
monthly_mean_in = mean_mm_to_in(data_mm=precip_2002_2013_mm,
axis_value=0)

monthly_mean_in
```

```python
# Calculate yearly mean (inches) for precip_2002_2013
yearly_mean_in = mean_mm_to_in(data_mm = precip_2002_2013_mm,
axis_value = 1)
yearly_mean_in = mean_mm_to_in(data_mm=precip_2002_2013_mm,
axis_value=1)

yearly_mean_in
```
Expand Down

0 comments on commit efefd62

Please sign in to comment.