How to use opencv's C++ functions for interfacing with numpy?

Greetings!

I’ve been writing a C++ library that uses openCV and interfaces with python.

My idea is to use the Mat to numpyArray conversor from /modules/python/src2 but I am not sure if these functions are compiled/linked against libopencv_core and how to import them.

All in all, can you hint me into converting a cv::Matinto a NumPy array ?