Make ddper return an object instead of an array.

Refs #162