Numpy will use free() not delete, so we need to use malloc to avoid a mismatch. This fixes issue #579.