Fix new binnin error for older numpy version