compatibility with numpy 1.6