Some routines in fftpack used an invalid way to determine if data can be overwritten, which fails e.g. for non-ndarray objects providing an array interface but no __array__ method. Also make tests checking the fft routine behavior stricter.
The _fix_shape helper routine in some cases returns slices of the input array, which does not create copies. In those cases, one should not set overwrite_x=1.
… sizes For large "difficult" sizes, the current single precision implementation apparently falls back to a non-optimal algorithm, and can produce large rounding errors. (bug #1212) This commit provides a work-around, by enabling the single-precision algorithms only for sizes that are composite numbers of 2, 3, and 5, for which FFTPACK has explicit support. This is probably a rather conservative approach. (cherry picked from r6570)