Change from TypeError to ValueError

should shut py3k up a bit more
still some broadcast issues