18.03.2011 19:42, SherjilOzair пишет:
> Hi,

Good evening.

> I'm working on a small base implementation of numpy-style array for
> sympy.
> Currently I've added component-wise addition, subtraction,
> multiplication, mult by integer. I've uploaded the code on GitHub.

Where is it?


Here are some points of discussion.

1) If unequal-sized arrays are added, should an error be raised or
should they still be force-added taking the missing elements as zero ?
2) Multiplication of two linear arrays should give another linear
array, with component-wise multiplication ? Or an array of 2-tuples,
like one does with Sets ?
3) If using component-wise multiplication, for unequal arrays, should
the missing elements be taken as one ? Or should an error be raised ?
4) Power will be done component-wise ? But this depends on the answer
to point 2.
5) Any more features ?

Thanks,
Sherjil Ozair

Sorry, I can entangle you, but:

May be it would be helpful for answering of your questions if the aims of 'numpy-style array' would be more clear (for me at least, I can't find issues, aims or description of 'numpy-style array').

I can be mistaken, but as I understand the situation is that in sympy now numpy.array is wildly used. But the roadmap is to replace it in core by pure python implementation, (all that is related with symbolic calculations).

'numpy' now is used internally in matrices, linear algebra, indexes. (Especially arrays related with indexes). So, if this aim is true, it must be toke into consideration how numpy.array used in sympy now. And what the multiplication f.e. is must (I think that like a 'numpy')

Another possible aim is to use the 'array' object in sympy (instead numpy), in command line interface ('isympy') too. But even in this case, the behavior of this 'array' expected to be as numpy too.

Formally, array is not related with mathematics, but indexes, linear algebra, matricex are, and they now present in core somehow, btw.

So we must avoid the mixing of works with array and so on.

P.S.

Additionally, if you interesting, in sympy there are no mathematical Sequence object [1].

It can be infinite (double sides) or finite. One dimension only.

Operation of multiplication are element wise (by default), but Cauchy product must be implemented as separated method.
So it is the answer for your 2) in this case.
The answer 3): zero.
And for 5) I can write a lot (convergence, recurrence, other operations) that are needed for series polishing.

[1] http://en.wikipedia.org/wiki/Sequence




--
Alexey U.

--
You received this message because you are subscribed to the Google Groups 
"sympy" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sympy?hl=en.

Reply via email to