*ROOT Version:* 6.26.10

*Platform:* Windows

Hi everyone!

I want to sample a point from a two dimensional histogram. I saw that GetRandom2() gives me a random point in x and a random point in y but I am not sure how to sample them.

In c++ I saw that to sample a point from a 2d histogram f, we write:

fâ>GetRandom2 ( x , y )

I tried the following lines in python:

```
x_0, y_0 = f.GetRandom2()
(x_0, y_0) = f.GetRandom2()
f.GetRandom2(x_0, y_0)
```

The first two return the error:

```
TypeError: void TH2::GetRandom2(double& x, double& y, TRandom* rng = nullptr) =>
TypeError: takes at least 2 arguments (0 given)
```

And the third one asks me to identify x_0 and y_0 beforehand.

Can someone please help me figure this out?

Thank you in advance and have a wonderful day!

K