changed double to npy_double