ENH: Add keepdims

Simple change, ready for review @drammock @rkmaddox.