fixed output shape calculation for reduce operations
fixed output shape calculation for reduce operations

bssrdf/cudarray,andersbll/cudarray,rufrozen/cudarray,rufrozen/cudarray,rufrozen/cudarray,malzantot/cudarray,lre/cudarray,andersbll/cudarray,malzantot/cudarray,bssrdf/cudarray,lre/cudarray