# A skeletal class definition for 3D vectors.

import numpy

class Vector:
	"""This triple (double) quoted string is used by Python
	for documentation. You would include here comments on the
	Vector class.
	"""

	def __init__(self, x, y, z):
		self.array = numpy.array([x,y,z])

	def __add__(self, other):
		sum = self.array+other.array
		return Vector(sum[0], sum[1], sum[2])

	def length(self):
		return numpy.sqrt(numpy.add.reduce(self.array*self.array))

	def __repr__(self):
		return 'Vector(%s,%s,%s)' % (`self.array[0]`,`self.array[1]`,`self.array[2]`)

