This is a direct translation to Python3.6 from another C++11 translation from the reference java implementation of the improved perlin function (see http://mrl.nyu.edu/~perlin/noise/). The original java implementation is copyright 2002 Ken Perlin.
I added an extra method that generates a new permutation vector (this is not present in the original implementation).