Re: [sympy] Re: ArrayComprehension or List

2019-06-05 Thread Zhiqi KANG
> I see what you mean about the multidimensionality I am happy to be helpful. :-) > should ArrayComprehension(...) + ArrayComprehension(...) work to add the corresponding elements? That is a good point. As far as I know, the addition of two ArrayComprehension doesn't make sense. So it would

Re: [sympy] Re: ArrayComprehension or List

2019-06-04 Thread Aaron Meurer
Does it support vectorized operations, e.g., should ArrayComprehension(...) + ArrayComprehension(...) work to add the corresponding elements? If so, then it's an array. If not, then it's more like a list or tuple. Aaron Meurer On Tue, Jun 4, 2019 at 6:52 AM Chris Smith wrote: >> >> As you can

[sympy] Re: ArrayComprehension or List

2019-06-04 Thread Chris Smith
> > As you can see, `ArrayComprehension` is more likely to be a such > structure: [[[...]...]...]. Ahh...I see what you mean about the multidimensionality, now. It is a *reshaped *list comprehension: >>> reshape([i + j for i in range(4) for j in range(3) for k in range(2)], [[2]]*3)

[sympy] Re: ArrayComprehension or List

2019-06-04 Thread Zhiqi KANG
Hi, As far as I know, the difference between `ArrayComprehension` and `list` lies in the notion of multidimensionality. First of all, for clarification, > `List(i + j, (i,0,3), (j,0,4))` is the unevaluated form of `[i + j for i in range(4) for j in range(5)]`. is not quite true regarding the