Pythonのndarrayを使ってテンソルの様に添字によって演算が変化するプログラムを検討しました。勉強会資料の改訂版です。
アルゴリズム詳細は
https://www.evernote.com/shard/s71/sh/8a2f856f-26a8-4487-a716-5bd7782ac681/06738b76a00132e4cdeba063d156755b
プログラムは
https://github.com/uyuutosa/public/tree/master/ndarr_v1
https://github.com/uyuutosa/public/tree/master/modules/numerical_utils/tensor_utils
です。