Skip to content

Instantly share code, notes, and snippets.

@werterzz
Created March 12, 2022 08:11
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 werterzz/e834b088170fa3bb2f6121e0ae40d74d to your computer and use it in GitHub Desktop.
Save werterzz/e834b088170fa3bb2f6121e0ae40d74d to your computer and use it in GitHub Desktop.
listData = [1, 2, 3]
npArrData = np.asarray(listData)
print("listData:", type(listData), ": ", listData)
print("npArrData: ", type(npArrData), ": ", npArrData)
# Output
# listData: <class 'list'> : [1, 2, 3]
# npArrData: <class 'numpy.ndarray'> : [1 2 3]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment