Detect more square patterns

As the one found in the benchmark `slowparts.py'
Can you add a doctest for numpy.power(X, 2) ?