Added 4D matrix python interface