Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

Bug numba.njit failed with cache=True

Discussion in 'Formats & External Tools Previews' started by guoxx_, Dec 22, 2022.

  1. guoxx_


    Mar 16, 2021
    The following python code failed to JIT when cache was enabled.

    @njit(nogil=True, cache=True)
    def spherical_dir(theta, phi):
    x = np.sin(theta) * np.cos(phi)
    y = np.sin(theta) * np.sin(phi)
    z = np.cos(theta)
    return x, y, z

    error message:
    PythonException: cannot cache function 'spherical_dir': no locator available for file '<string>'