in cpp potential wrapper deal cleanly with bad returns

bad returns from getEnergy and getEnergyGradient
in cpp potential wrapper copy input into numpy array

This is because you can't guarantee that the Numpy array won't live
longer than the data it wraps.