Skip to content

Instantly share code, notes, and snippets.

@stephengruppetta
Created January 6, 2024 12:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save stephengruppetta/1726da0ef0ec1f094ac006a53a9a9988 to your computer and use it in GitHub Desktop.
Save stephengruppetta/1726da0ef0ec1f094ac006a53a9a9988 to your computer and use it in GitHub Desktop.
some_weird_list = [1, 2.2, True, "Hello there!", (0, 0), [2, 4, 6]]
some_weird_ndarray = np.array(some_weird_list)
# Traceback (most recent call last):
# ...
# ValueError: setting an array element with a sequence. The requested array has an inhomogeneous shape after 1 dimensions. The detected shape was (6,) + inhomogeneous part.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment