On Fri, Mar 18, 2011 at 9:42 AM, SherjilOzair <[email protected]> wrote:
> Hi,
>
> 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.

Cool.

> 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 ?

If we are going to have a numpy-like object for sympy expressions, it
should have the same exact API as numpy arrays (probably other than
the dtype stuff).

> 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.

Again, unless there is a really strong reason to diverge from numpy I
*highly* recommend simply copying the API to the extent that you
implement it (we don't have to implement everything, but what we do
implement, we should copy numpy...).

> 5) Any more features ?

I think more advanced indexing and broadcasting and then symbolic
ufuncs would top my list...

Cheers,

Brian


> Thanks,
> Sherjil Ozair
>
> --
> 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.
>
>



-- 
Brian E. Granger, Ph.D.
Assistant Professor of Physics
Cal Poly State University, San Luis Obispo
[email protected]
[email protected]

-- 
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