tensor: added support for __newindex