How to generate cauchy matrix using NumPy arrays?

I got a task in which I have to generate a Cauchy matrix using the Python library, NumPy. I have coded one method in which I have used NumPy’s broadcasting approach, but this technique doesn’t look efficient to me.
Here’s an approach, I have coded:

If someone helps me with coding the Cauchy matrix with some alternative approach, I will appreciate them. Hoping for positive answers.