On Tue, May 27, 2008 at 04:28:22PM +0200, Ondrej Certik wrote:
>
> On Tue, May 27, 2008 at 3:56 PM, Friedrich Hagedorn <[EMAIL PROTECTED]> wrote:
> >
> > On Tue, May 27, 2008 at 05:22:54AM -0700, astozzia wrote:
> >>
> >> evec=dvecM/sqrt(s.dot(dvec,dvec))
> >>
> >> Note that I had to use the 'Matrix' and divide my the norm of the
> >> 'list'. Kinda weird...
> >
> > The problem is that we dont have a true vector support in sympy yet.
> > Specialy you cant define a function of a matrix/vector, thats bad.
> >
> > The derivation of
> >
> > In [4]: vec = s.array([cos(phi(t)),x(t),z(t)])
> > In [5]: dvec = diff(vec,t)
> >
> > is simply done by a 'elementwise' derivation of the single elements
> > of the vec array. From the mathematical point of view I think this
> > isnt ideal. The 'diff(vec, t)' should better wrapped to something
> > like the jacobion matrix.
> >
> > We had a long discussion an sympy-patches
> >
> >
> > http://groups.google.com/group/sympy-patches/browse_thread/thread/78bf61123b3d7405
> >
> > where I had sum up my opinion. But you know the time is raw ... :-)
>
> I think simply one has to write a patch for that and if it's good it will go
> in.
>
> > And I am not sure if its so good to do this (vector extension) in sympy
> > because I think the sympycore project had a better
> > (mathematical) structure for that.
>
> Unfortunately, sympycore is a different project not directly usable by
> sympy (we may include it in thirdparty, but that's still not the
> solution imho, but at least we can then easily use one or the other,
> before someone will merge things completely, which unfortunately, will
> take much longer).
I guessed thats this would be the real hard work :-(
> However, I have always been all for merging our
> efforts. Could you please summarize which structure in sympycore is
> better? Let's use the same way in sympy.
Ok, just a short try do explain my fuzzy imagination about this. Its more
an emotion to this :-)
I like the (abstract) algebra idea. You have
expressions (operations) of symbols. And when you eval an expression
the operations must defined for the symbol types like
Numbers,
Functions,
Vector, Matrices and
of curse (sub-)expressions.
And for all the things there are exists different algebras to define
the operations.
I have no idea how to implement this in sympy (ok I am relativ new here)
>>> M = Matrix(1,3,[x,y,z])
>>> f = Function('f')
>>> f(M)
f(M)
without isinstance(...) because the argument should be a symbol and not
a Matrix ?!? But may be I am a little bit confused and the the things
are not so different in sympy/sympycore as I thought ;-)
> I read that discussion in
> sympy-patches ---- I am not sure what exactly you propose, and which
> things you agreed with Basti and which not. So let's get things
> moving.
I meant the least message (number 28 from 7.5. 12:53). I didnt know
how to link to a single post in a thread.
> Basically, a good measure how to determine if something is
> useful/worthy is just to write a patch, try if all tests pass and if
> they do, and the patch is maintainable, it will go in. You don't have
> to write a real patch, just think about things in this way.
I slowly get an idea of your develoment strategy :-)
By, Friedrich
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---