A 2D matrix built for pattern recognition with C++ and Python API