* add function to deal with keepdims=True * preliminary keepdims fix * fux keepdims code * remove out-commented code