Convert of ROOT Double_t buffer to list/numpy

What is the optimal way to convert ROOT buffer to some kind of a python data type? I’d like to, for example, compute a mean of a values used to draw a graph from a tree, preferably with numpy.

OK, found a solution here on the forum, but again, for someone looking for it:

u = np.ndarray((num_of_elements), 'd', rootarray)