wrapper X and Y directly in C++, avoid copying between python and C++.