When an axis is degenerate lots of div zero and inf were happening. Try to handle it more gracefully.