An array of size N x M represents pixels of an image.
Each cell of this array contains an array of size 3 with the pixel's color information: `[R,G,B]`

Convert the color image, into an *average* greyscale image. 

The `[R,G,B]` array contains integers between 0 and 255 for each color. 

To transform a color pixel into a greyscale pixel, average the values of that pixel:
```
p = [R,G,B] => [(R+G+B)/3, (R+G+B)/3, (R+G+B)/3]
```

**Note:** the values for the pixel must be integers, therefore you should round floats to the nearest integer.

## Example

Here's an example of a 2x2 image: 
 
Here's the expected image after transformation:


You are always welcome to check out some of my other katas:

Very Easy (Kyu 8)
Add Numbers
Easy (Kyu 7-6)
Convert Color image to greyscale
Array Transformations
Basic Compression
Find Primes in Range
No Ifs No Buts
Medium (Kyu 5-4)
Identify Frames In An Image
Photoshop Like - Magic Wand
Scientific Notation
Vending Machine - FSA
Find Matching Parenthesis
Hard (Kyu 3-2)
Ascii Art Generator

Source: codewars | Difficulty: EASY

Starter code: def color_2_grey(colors):
	

Solutions:
from statistics import mean

def grey(rgb):
	return [int(round(mean(rgb)))] * 3

def color_2_grey(colors):
	return [[grey(pixel) for pixel in row] for row in colors]


def color_2_grey(colors):
	return [[[int(round(sum(rgb) / 3))] * 3 for rgb in row] for row in colors]


def color_2_grey(colors):
	for line in colors:
		for pixel in line:
			grey = int(sum(pixel) / 3 + 0.5)
			pixel[0] = grey
			pixel[1] = grey
			pixel[2] = grey
	return colors


def color_2_grey(a):
	return [[[round(sum(y) / 3)] * 3 for y in x] for x in a]


def color_2_grey(colors):
	return [[[round(sum(p) / 3) for i in p] for p in r] for r in colors]


def color_2_grey(colors):
	res = []
	for row in colors:
		g_row = []
		for pix in row:
			g_pix = []
			for c in pix:
				g_pix.append(int(round(sum(pix) / 3, 0)))
			g_row.append(g_pix)
		res.append(g_row)
	return res


def color_2_grey(colors):
	return [[[round(sum(pixel) / 3)] * 3 for pixel in line] for line in colors]


def color_2_grey(colors):
	return [[[round((r + g + b) / 3)] * 3 for (r, g, b) in row] for row in colors]


def color_2_grey(colors):
	for i in range(len(colors)):
		for j in range(len(colors[i])):
			t = (colors[i][j][0] + colors[i][j][1] + colors[i][j][2]) / 3
			colors[i][j].remove(colors[i][j][0])
			colors[i][j].remove(colors[i][j][0])
			colors[i][j].remove(colors[i][j][0])
			colors[i][j].append((t + 0.5) // 1)
			colors[i][j].append((t + 0.5) // 1)
			colors[i][j].append((t + 0.5) // 1)
	return colors


def color_2_grey(colors):
	return [[[round((R + G + B) / 3)] * 3 for [R, G, B] in row] for row in colors]