[SciPy-User] convolution of 2d arrays of exotic complex numbers (dual and split)

Oleksandr Huziy guziy.sasha@gmail....
Mon Nov 14 11:30:41 CST 2011

```Hi Denis,

I am not sure that this can work, since it is possible that convolution is
computed using Fourier transform (performance gain)

So maybe you get something weird when it tries to multiply ordinary complex
numbers with your
special complex numbers during the fourier transform. Though ÙI am not a
great sspecialist.

Have a nice evening, I suppose))

--
Oleksandr Huziy

2011/11/14 Denis Yershov <kooleyba@gmail.com>

> i used scipy.signal.convolve to work with complex-number arrays.
> now i need to convolve arrays of dual numbers (i*i=0) and split-complex
> numbers (i*i=1). so i have a class (
> http://dl.dropbox.com/u/4988243/iComplex.py) which implements this
> numbers:
>
> class PlainComplex(Complex):
>     def __mul__(self, other):
>         other = ToComplex(other)
>         return PlainComplex(self.re*other.re - self.im*other.im,
>                        self.im*other.re + self.re*other.im)
>
> class DualComplex(Complex):
>     def __mul__(self, other):
>         other = ToComplex(other)
>         return DualComplex(self.re*other.re,
>                        self.im*other.re + self.re*other.im)
>
> class SplitComplex(Complex):
>     def __mul__(self, other):
>         other = ToComplex(other)
>         return SplitComplex(self.re*other.re + self.im*other.im,
>                        self.im*other.re + self.re*other.im)
>
> as you can see only multiplication function is being changed.
> the question: is it possible to feed arrays of such objects to scipy's
> convolution function? when i try to do it for PlainComplex class it seems
> to work wrong (different from using python's complex numbers):
> http://dl.dropbox.com/u/4988243/sandbox.py - my complex
> http://dl.dropbox.com/u/4988243/sandbox2.py - python complex
>
> or maybe there is some alternative solution?
> thanx!
>
> _______________________________________________
> SciPy-User mailing list
> SciPy-User@scipy.org
> http://mail.scipy.org/mailman/listinfo/scipy-user
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/scipy-user/attachments/20111114/18a35079/attachment.html
```