Python class to handle vectors