# TMatrixD <-> array conversion This section describes how to convert a `TMatrixD` into a `numpy.array` and vice-versa. A breakdown of the macro show below can be found in [](#use_cases_howto_py_tmatrixd_array_py) {{ "```{literalinclude} " + parent_dir + "/roottest/uranie/doc/overview/use_cases/python/howtoConvertTMatrixDArray.py\n" + ":language: python\n" + ":lines: 1-5,11-35\n" + "```" }} The macro shown above, is an example of how to convert the content stored in a `TMatrixD` but also how to go from a `numpy.array` back to `TMatrixD` if one needs to provide this to an {{uranie}}'s method. Its result is discussed in [](#use_cases_howto_py_tmatrixd_array_py).