Initial copy from nengo 1.4 (plus a single example)