Update transforms.py

fix warnings behavior