Skip to content

Instantly share code, notes, and snippets.

@luowanqian
Last active October 27, 2022 20:04
Show Gist options
  • Save luowanqian/d2f655a95f77dfe088fd626f72d78966 to your computer and use it in GitHub Desktop.
Save luowanqian/d2f655a95f77dfe088fd626f72d78966 to your computer and use it in GitHub Desktop.
文章:快速生成Kernel Matrix,文章链接:http://www.scutmath.com/fast_kernel_matrix_generation.html
Display the source blob
Display the rendered blob
Raw
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@hlin863
Copy link

hlin863 commented Oct 27, 2022

When recreating the function method1, I encounter an error message: "setting array with a sequence" on the line of code:

mat[i, j] = np.exp(-0.5 / sigma**2 * np.dot(vec, vec))

Would you like to verify the version of the code to recreate my problem?

Thank you in advance for considering my question,

Haocheng

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment