fixed bug with numpy wrapper