So, my the dimension of vecI is fixed (3,3) and vecJ is a larger vector (3*N,3) where N is variable. To create rIVec I know the first three values (the first and the last two values for rJVec) , but the last two values are extracted by looping over mol2Coord/vecJ (same for rJVec). I can rewrite them as:
def myfunc(mol1Coord,mol2Coord):
rIVec=np.zeros((5,3), dtype=numba.float64)
rJVec=np.zeros((5,3), dtype=numba.float64)
for j in numba.prange(int(mol2Coord.shape[0]/3)):
rIVec[0] = rIVec[1] = rIVec[2] = mol1Coord[0]
rIVec[3] = rIVec[4] = rJVec[0] = mol2Coord[3*j]
rJVec[1] = mol2Coord[3*j+1]
rJVec[2] = mol2Coord[3*j+2]
rJVec[3] = mol1Coord[1]
rJVec[4] = mol1Coord[2]
return rIVec, rJVec
Is this what you had in your mind? I am not sure if this is efficient in numba.prange ?