# ASC Week 1 Challenge 5 (Medium #2)

Create a function that takes a 2D array as an input, and outputs another array that contains the average values for the numbers in the nested arrays at the corresponding indexes. 

Note: the function should also work with negative numbers and floats.

## Examples
```
[ [1, 2, 3, 4], [5, 6, 7, 8] ]  ==>  [3, 4, 5, 6]

1st array: [1, 2, 3, 4]
2nd array: [5, 6, 7, 8]
            |  |  |  |
            v  v  v  v
average:   [3, 4, 5, 6]

```

And another one:
```
[ [2, 3, 9, 10, 7], [12, 6, 89, 45, 3], [9, 12, 56, 10, 34], [67, 23, 1, 88, 34] ]  ==>  [22.5, 11, 38.75, 38.25, 19.5]

1st array: [  2,   3,    9,   10,    7]
2nd array: [ 12,   6,   89,   45,    3]
3rd array: [  9,  12,   56,   10,   34]
4th array: [ 67,  23,    1,   88,   34]
              |    |     |     |     |
              v    v     v     v     v
average:   [22.5, 11, 38.75, 38.25, 19.5]
```

Difficulty: EASY
Starter code: def avg_array(arrs):
	

Solutions:
def avg_array(arrs):
	return [sum(a) / len(a) for a in zip(*arrs)]


def avg_array(arrs):
	length = len(arrs)
	return [sum(arr) / length for arr in zip(*arrs)]


from statistics import mean

def avg_array(arrs):
	return list(map(mean, zip(*arrs)))


def avg_array(arrs):
	return [sum((ar[i] for ar in arrs)) / len(arrs) for i in range(len(arrs[0]))]


def avg_array(arr):
	length = len(arr)
	return [sum(numbers) / length for numbers in zip(*arr)]


def avg_array(arrs):
	return [sum(i) / len(i) for i in zip(*arrs)]


from statistics import mean

def avg_array(arrs):
	return [mean(arr) for arr in zip(*arrs)]


def avg_array(arrs):
	x = []
	for i in zip(*arrs):
		x.append(sum(i) / len(arrs))
	return x


import numpy as np

def avg_array(arrs):
	return (np.sum(arrs, 0) / len(arrs)).tolist()