BUG: fix some numpy 1.3 compat issue
BUG: numpy 1.6 compat