Try to fix a json error where it cannot handle a numpy mask