bfield += b_X(r_p(r, pos[2])) * (r_p(r, pos[2]) / r) * ((r - r_p(r, pos[2])
    ) ** 2 + pos[2] ** 2) ^ -1 / 2 * np.array([(1 - r_p(r, pos[2]) / r) *
    pos[0], (1 - r_p(r, pos[2]) / r) * pos[1], pos[2]])
TypeError с ufunc bitwise_xor