Convolution of NumPy arrays of arbitrary dimension

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Convolution of NumPy arrays of arbitrary dimension

Foad Sojoodi Farimani
Hello everyone,

My first email here, so sorry in advance if I'm violating any rules.
I'm trying to implement the convolution of NumPy arrays of arbitrary dimension in order to get Cauchy product of multivariate power series. However I have some issues. I was wondering maybe you can help and this might also be of your interest.  I have explained everything here in this StackOverflow post:


I would appreciate if you could help me figure this out. Thanks in advance.

Best,
Foad

_______________________________________________
NumPy-Discussion mailing list
[hidden email]
https://mail.python.org/mailman/listinfo/numpy-discussion
Reply | Threaded
Open this post in threaded view
|

Re: Convolution of NumPy arrays of arbitrary dimension

einstein.edison
On 11. Aug 2018, at 00:24, Foad Sojoodi Farimani <[hidden email]> wrote:

Hello everyone,

My first email here, so sorry in advance if I'm violating any rules.
I'm trying to implement the convolution of NumPy arrays of arbitrary dimension in order to get Cauchy product of multivariate power series. However I have some issues. I was wondering maybe you can help and this might also be of your interest.  I have explained everything here in this StackOverflow post:


I would appreciate if you could help me figure this out. Thanks in advance.

Best,
Foad
_______________________________________________
NumPy-Discussion mailing list
[hidden email]
https://mail.python.org/mailman/listinfo/numpy-discussion

Hi Foad, you can use scipy.signal.convolve. It works on N-D arrays.

Best Regards
Hameer Abbasi
Sent from my iPhone

_______________________________________________
NumPy-Discussion mailing list
[hidden email]
https://mail.python.org/mailman/listinfo/numpy-discussion
Reply | Threaded
Open this post in threaded view
|

Re: Convolution of NumPy arrays of arbitrary dimension

Foad Sojoodi Farimani
Hi Hameer,

Thanks for the reply. I have indeed seen scipy.ndimage.convolve and have mentioned it in the OP. but some questions:

  1. although there is nothing about the dimension of the ndarrays in its official page, but I haven't seen any examples showing it works with higher dimensions.
  2. the only generalization I know of is astropy.convolution which works up to 3D. 
  3. what is the difference between seen scipy.ndimage and scipy.signal.convolve? It seems to me the later is for function analysis not array arithmetics. 
  4. As I can see the term convolution, even for array, arithmetics has different meanings. For example there is also scipy.ndimage.filters.convolve which apparently calculate things in a different way. My final goal is do finite multivariate formal power series multiplication (Cauchy product). I think I have figured the formula out here, but I'm not sure if it is correct completely. questions are:
    1. is my formula correct? 
      • if not what is the correct one?
    2. if yes has this been done before?
      • if yes where? does any of the above functions do the job?
    3. if not is my implementation correct so far?
    4. how to finish the final step to populate the ndarray using the conv function? 
Thanks a gain and looking forwards to hearing back.

Best,
Foad

On Sat, Aug 11, 2018 at 7:39 AM <[hidden email]> wrote:
On 11. Aug 2018, at 00:24, Foad Sojoodi Farimani <[hidden email]> wrote:

Hello everyone,

My first email here, so sorry in advance if I'm violating any rules.
I'm trying to implement the convolution of NumPy arrays of arbitrary dimension in order to get Cauchy product of multivariate power series. However I have some issues. I was wondering maybe you can help and this might also be of your interest.  I have explained everything here in this StackOverflow post:


I would appreciate if you could help me figure this out. Thanks in advance.

Best,
Foad
_______________________________________________
NumPy-Discussion mailing list
[hidden email]
https://mail.python.org/mailman/listinfo/numpy-discussion

Hi Foad, you can use scipy.signal.convolve. It works on N-D arrays.

Best Regards
Hameer Abbasi
Sent from my iPhone
_______________________________________________
NumPy-Discussion mailing list
[hidden email]
https://mail.python.org/mailman/listinfo/numpy-discussion

_______________________________________________
NumPy-Discussion mailing list
[hidden email]
https://mail.python.org/mailman/listinfo/numpy-discussion