You can achieve this with ctypes. First create a shared object with C Api.ctypes does not support C++ but only C. This means that you can use c++ in your source code but you have to provide a C interface without C++ languages features like function overloading or name mangling. Therefor the function definitions are marked with extern "C".
Then load the shared object in python. Set argument types and result types. Finally you can call your function. Here is an example:
import ctypes
import numpy as np
n = 1000000
xyz1 = np.random.random((n,)).tolist()
xyz2 = np.random.random((n,)).tolist()
#pass above array to the C/C++ code for further processing.
Func = ctypes.CDLL("path/to/libFunc.so")
Func.func.argtypes = [ctypes.POINTER(ctypes.c_double), ctypes.POINTER(ctypes.c_double), ctypes.c_int]
res = Func.func(xyz1,xyz2,n) # <-- the call to the c/c++ code
I didn't test it so possibly there are some errors but I think the idea should be clear. Here is an example I tested:
CMakeLists.txt:
cmake_minimum_required (VERSION 3.5.1) 
project (DotProduct) 
set(CMAKE_CXX_STANDARD 14) 
set(CMAKE_BUILD_TYPE Debug) 
add_library(DotProduct SHARED src/DotProduct.cpp src/DotProduct.h)
DotProduct.h:
extern "C" double dotProduct(double* l, double* r, unsigned int len);
DotProduct.cpp:
#include "DotProduct.h" 
double dotProduct(double *l, double *r, unsigned int len) { 
    double sum(0); 
    while (len--) { 
        sum += l[len] * r[len]; 
    } 
    return sum; 
}
main.py:
import ctypes
def dot_product(v1, v2):    
    l = len(v1)    
    if l != len(v2):        
        return 0    
    vec1 = (ctypes.c_double * l)(*v1)    
    vec2 = (ctypes.c_double * l)(*v2)    
    Dot_Product = ctypes.CDLL("build/lib/libDotProduct.so")      
    Dot_Product.dotProduct.argtypes = [ctypes.POINTER(ctypes.c_double), ctypes.POINTER(ctypes.c_double), ctypes.c_uint]    
    Dot_Product.dotProduct.restype = ctypes.c_double
    return Dot_Product.dotProduct(vec1, vec2, l)
vec1 = [2, 2]
vec2 = [2, 3]
print("{} * {} = {}".format(vec1, vec2, dot_product(vec1, vec2)))