Shape Manipulation In Python Mean