On Saturday, March 8, 2014 4:23:50 AM UTC+1, Matthew wrote: > > I do like the idea of dispatch. I'm not sure that I understand the rest > though. Maybe I need a more explicit example. We'll probably have to > convert back at some point. > > As soon as there is multiple dispatch, an approach similar to this one could be devised: http://julia.readthedocs.org/en/latest/manual/conversion-and-promotion/
For me an example of shared functionality might be indexing. Many matrix > expressions can be reduced to indexed expressions. Operations like matrix > multiply could be written more generally as contractions. These > contractions might mean something very different on a Matrix, a > MatrixExpression, or a Tensor* but we might be able to find simplifications > that are common to all. > Tensors defined in *sympy.tensor.tensor* do not define components by default, they only store index-types, index-symmetries and commutation symmetries of tensors. The only common feature with n-dimensional arrays is the number of indices. I think that the shared common feature would then be just the number of indices, unless you're willing to create a structure with many optional features. I would not concentrate the efforts on a tensor core, rather a system of easiness of conversion/promotion of types would be more beneficial. -- You received this message because you are subscribed to the Google Groups "sympy" group. To unsubscribe from this group and stop receiving emails from it, send an email to sympy+unsubscr...@googlegroups.com. To post to this group, send email to sympy@googlegroups.com. Visit this group at http://groups.google.com/group/sympy. To view this discussion on the web visit https://groups.google.com/d/msgid/sympy/b16e45b1-85de-4033-bb67-e0547142559c%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.