printbr(T)
|
$\overset{a\downarrow b\rightarrow}{\left[\begin{array}{ccc} {T_{xx}}& {T_{xy}}& {T_{xz}}\\ {T_{yx}}& {T_{yy}}& {T_{yz}}\\ {T_{zx}}& {T_{zy}}& {T_{zz}}\end{array}\right]}$
GOOD |
time: 0.129000ms stack: size: 0 |
| ||
writing apparently does
| ||
| ||
printbr(T'_ij':prune()) assertEq(T'_ij':prune(), T)
|
$\overset{i\downarrow j\rightarrow}{\left[\begin{array}{ccc} {T_{xx}}& {T_{xy}}& {T_{xz}}\\ {T_{yx}}& {T_{yy}}& {T_{yz}}\\ {T_{zx}}& {T_{zy}}& {T_{zz}}\end{array}\right]}$
${\overset{i\downarrow j\rightarrow}{\left[\begin{array}{ccc} {T_{xx}}& {T_{xy}}& {T_{xz}}\\ {T_{yx}}& {T_{yy}}& {T_{yz}}\\ {T_{zx}}& {T_{zy}}& {T_{zz}}\end{array}\right]}} = {\overset{a\downarrow b\rightarrow}{\left[\begin{array}{ccc} {T_{xx}}& {T_{xy}}& {T_{xz}}\\ {T_{yx}}& {T_{yy}}& {T_{yz}}\\ {T_{zx}}& {T_{zy}}& {T_{zz}}\end{array}\right]}}$ GOOD |
time: 1.464000ms stack: size: 9
|
printbr(T'_xx':prune()) assertEq(T'_xx':prune(), T[1][1])
|
${T_{xx}}$
${{T_{xx}}} = {{T_{xx}}}$ GOOD |
time: 0.838000ms stack: size: 2
|
printbr(T'_xy':prune()) assertEq(T'_xy':prune(), T[1][2])
|
${T_{xy}}$
${{T_{xy}}} = {{T_{xy}}}$ GOOD |
time: 0.878000ms stack: size: 2
|
printbr(T'_xz':prune()) assertEq(T'_xz':prune(), T[1][3])
|
${T_{xz}}$
${{T_{xz}}} = {{T_{xz}}}$ GOOD |
time: 0.553000ms stack: size: 2
|
printbr(T'_yx':prune()) assertEq(T'_yx':prune(), T[2][1])
|
${T_{yx}}$
${{T_{yx}}} = {{T_{yx}}}$ GOOD |
time: 0.549000ms stack: size: 2
|
printbr(T'_yy':prune()) assertEq(T'_yy':prune(), T[2][2])
|
${T_{yy}}$
${{T_{yy}}} = {{T_{yy}}}$ GOOD |
time: 0.586000ms stack: size: 2
|
printbr(T'_yz':prune()) assertEq(T'_yz':prune(), T[2][3])
|
${T_{yz}}$
${{T_{yz}}} = {{T_{yz}}}$ GOOD |
time: 0.607000ms stack: size: 2
|
printbr(T'_zx':prune()) assertEq(T'_zx':prune(), T[3][1])
|
${T_{zx}}$
${{T_{zx}}} = {{T_{zx}}}$ GOOD |
time: 0.484000ms stack: size: 2
|
printbr(T'_zy':prune()) assertEq(T'_zy':prune(), T[3][2])
|
${T_{zy}}$
${{T_{zy}}} = {{T_{zy}}}$ GOOD |
time: 0.467000ms stack: size: 2
|
printbr(T'_zz':prune()) assertEq(T'_zz':prune(), T[3][3])
|
${T_{zz}}$
${{T_{zz}}} = {{T_{zz}}}$ GOOD |
time: 0.513000ms stack: size: 2
|
printbr(T'_xp':prune()) assertEq(T'_xp':prune(), Tensor('_p', T[1][2], T[1][3]))
|
$\overset{p\downarrow}{\left[\begin{matrix} {T_{xy}} \\ {T_{xz}}\end{matrix}\right]}$
${\overset{p\downarrow}{\left[\begin{matrix} {T_{xy}} \\ {T_{xz}}\end{matrix}\right]}} = {\overset{p\downarrow}{\left[\begin{matrix} {T_{xy}} \\ {T_{xz}}\end{matrix}\right]}}$ GOOD |
time: 0.855000ms stack: size: 2
|
printbr(T'_yp':prune()) assertEq(T'_yp':prune(), Tensor('_p', T[2][2], T[2][3]))
|
$\overset{p\downarrow}{\left[\begin{matrix} {T_{yy}} \\ {T_{yz}}\end{matrix}\right]}$
${\overset{p\downarrow}{\left[\begin{matrix} {T_{yy}} \\ {T_{yz}}\end{matrix}\right]}} = {\overset{p\downarrow}{\left[\begin{matrix} {T_{yy}} \\ {T_{yz}}\end{matrix}\right]}}$ GOOD |
time: 0.805000ms stack: size: 2
|
printbr(T'_zp':prune()) assertEq(T'_zp':prune(), Tensor('_p', T[3][2], T[3][3]))
|
$\overset{p\downarrow}{\left[\begin{matrix} {T_{zy}} \\ {T_{zz}}\end{matrix}\right]}$
${\overset{p\downarrow}{\left[\begin{matrix} {T_{zy}} \\ {T_{zz}}\end{matrix}\right]}} = {\overset{p\downarrow}{\left[\begin{matrix} {T_{zy}} \\ {T_{zz}}\end{matrix}\right]}}$ GOOD |
time: 0.794000ms stack: size: 2
|
printbr(T'_px':prune()) assertEq(T'_px':prune(), Tensor('_p', T[2][1], T[3][1]))
|
$\overset{p\downarrow}{\left[\begin{matrix} {T_{yx}} \\ {T_{zx}}\end{matrix}\right]}$
${\overset{p\downarrow}{\left[\begin{matrix} {T_{yx}} \\ {T_{zx}}\end{matrix}\right]}} = {\overset{p\downarrow}{\left[\begin{matrix} {T_{yx}} \\ {T_{zx}}\end{matrix}\right]}}$ GOOD |
time: 0.874000ms stack: size: 2
|
printbr(T'_py':prune()) assertEq(T'_py':prune(), Tensor('_p', T[2][2], T[3][2]))
|
$\overset{p\downarrow}{\left[\begin{matrix} {T_{yy}} \\ {T_{zy}}\end{matrix}\right]}$
${\overset{p\downarrow}{\left[\begin{matrix} {T_{yy}} \\ {T_{zy}}\end{matrix}\right]}} = {\overset{p\downarrow}{\left[\begin{matrix} {T_{yy}} \\ {T_{zy}}\end{matrix}\right]}}$ GOOD |
time: 0.822000ms stack: size: 2
|
printbr(T'_pz':prune()) assertEq(T'_pz':prune(), Tensor('_p', T[2][3], T[3][3]))
|
$\overset{p\downarrow}{\left[\begin{matrix} {T_{yz}} \\ {T_{zz}}\end{matrix}\right]}$
${\overset{p\downarrow}{\left[\begin{matrix} {T_{yz}} \\ {T_{zz}}\end{matrix}\right]}} = {\overset{p\downarrow}{\left[\begin{matrix} {T_{yz}} \\ {T_{zz}}\end{matrix}\right]}}$ GOOD |
time: 1.213000ms stack: size: 2
|
printbr(T'_pq':prune()) assertEq(T'_pq':prune(), Tensor('_pq', {T[2][2], T[2][3]}, {T[3][2], T[3][3]}))
|
$\overset{p\downarrow q\rightarrow}{\left[\begin{array}{cc} {T_{yy}}& {T_{yz}}\\ {T_{zy}}& {T_{zz}}\end{array}\right]}$
${\overset{p\downarrow q\rightarrow}{\left[\begin{array}{cc} {T_{yy}}& {T_{yz}}\\ {T_{zy}}& {T_{zz}}\end{array}\right]}} = {\overset{p\downarrow q\rightarrow}{\left[\begin{array}{cc} {T_{yy}}& {T_{yz}}\\ {T_{zy}}& {T_{zz}}\end{array}\right]}}$ GOOD |
time: 1.400000ms stack: size: 2
|
| ||
reading by __index doesn't work?
| ||
I guess only writing by __index does for now
| ||
but why bother read by __index when you can just use the __call operator with strings?
| ||
printbr(T['_ij']) assertEq(T['_ij'], T)
| ||
printbr(T['_xx']) assertEq(T['_xx'], T[1][1])
| ||
printbr(T['_xy']) assertEq(T['_xy'], T[1][2])
| ||
printbr(T['_xz']) assertEq(T['_xz'], T[1][3])
| ||
printbr(T['_yx']) assertEq(T['_yx'], T[2][1])
| ||
printbr(T['_yy']) assertEq(T['_yy'], T[2][2])
| ||
printbr(T['_yz']) assertEq(T['_yz'], T[2][3])
| ||
printbr(T['_zx']) assertEq(T['_zx'], T[3][1])
| ||
printbr(T['_zy']) assertEq(T['_zy'], T[3][2])
| ||
printbr(T['_zz']) assertEq(T['_zz'], T[3][3])
| ||
printbr(T['_xp']) assertEq(T['_xp'])
| ||
printbr(T['_yp']) assertEq(T['_yp'])
| ||
printbr(T['_zp']) assertEq(T['_zp'])
| ||
printbr(T['_px']) assertEq(T['_px'])
| ||
printbr(T['_py']) assertEq(T['_py'])
| ||
printbr(T['_pz']) assertEq(T['_pz'])
| ||
printbr(T['_pq']) assertEq(T['_pq'])
|