# [Numpy-discussion] [ANN]: Taylorpoly, an implementation of vectorized Taylor polynomial operations and request for opinions

Sebastian Walter sebastian.walter@gmail....
Sat Feb 27 16:54:59 CST 2010

```On Sat, Feb 27, 2010 at 11:11 PM, Friedrich Romstedt
<friedrichromstedt@gmail.com> wrote:
> Ok, it took me about one hour, but here they are: Fourier-accelerated
> polynomials.

that's the spirit! ;)

>
>> python
> Python 2.4.1 (#65, Mar 30 2005, 09:13:57) [MSC v.1310 32 bit (Intel)] on win32
>>>> import gdft_polynomial
>>>> p1 = gdft_polynomial.Polynomial([1])
>>>> p2 = gdft_polynomial.Polynomial([2])
>>>> p1 * p2
> <gdft_polynomial.polynomial.Polynomial instance at 0x00E78A08>
>>>> print p1 * p2
> [ 2.+0.j]
>>>> p1 = gdft_polynomial.Polynomial([1, 1])
>>>> p2 = gdft_polynomial.Polynomial([1])
>>>> print p1 * p2
> [ 1. +6.12303177e-17j  1. -6.12303177e-17j]
>>>> p2 = gdft_polynomial.Polynomial([1, 2])
>>>> print p1 * p2
> [ 1. +8.51170986e-16j  3. +3.70074342e-17j  2. -4.44089210e-16j]
>>>> p1 = gdft_polynomial.Polynomial([1, 2, 3, 4, 3, 2, 1])
>>>> p2 = gdft_polynomial.Polynomial([4, 3, 2, 1, 2, 3, 4])
>>>> print (p1 * p2).coefficients.real
> [  4.  11.  20.  30.  34.  35.  36.  35.  34.  30.  20.  11.   4.]
>>>>
>
> github.com/friedrichromstedt/gdft_polynomials
>
> It's open for bug hunting :-)
>
> Haven't checked the last result.
looks correct
>
> I used my own gdft module.  Maybe one could incorporate numpy.fft
> easily.  But that's your job, Sebastian, isn't it?  Feel free to push
> notice, hope you are happy with MIT.
i'll have a look at it.
>
> Anyway, I don't know whether numpy.fft supports transforming only one
> coordinate and using the others for "parallelisation"?
>
> Friedrich
> _______________________________________________
> NumPy-Discussion mailing list
> NumPy-Discussion@scipy.org
> http://mail.scipy.org/mailman/listinfo/numpy-discussion
>
```