custom kernel data change as per #2190 for py3