python updates - no gradient shape optimization