sympy/sympy — pull request #2514 by Upabjojr (2013-10-06 14:00:17+00:00)
Title: Added numpy ndarray to TensorIndexType and TensExpr

In order to work with real data in a given basis, I added this PR to allow to add a numpy ndarray to a tensor expression or to a tensor index.

ndarrays on tensor indices are considered as the values of their metric tensors.
ndarrays on tensor expressions are considered as their values, in a given basis.

TODO list:
* [ ] decide whether ndarrays should affect the `args` in `Basic`.
* [ ] check that ndarray dimensions are compatible with `TensorIndexType` dimensions, both in metric and in tensor expressions.
* [ ] add printer for `VTIDS`
* [ ] add doctests to `VTIDS`
* [ ] `canon_bp` currently does not rearrange tensor axes in ndarray.
* [ ] add `applyfunc` doctests
* [ ] add `strip` doctests
* [ ] ndarray in `TensorIndexType` should be inherited by the metric.