Skip to content

Instantly share code, notes, and snippets.

@Roger8
Created May 21, 2018 02:32
Show Gist options
  • Select an option

  • Save Roger8/f524af666fa4e43da9a24ca3c319ca7f to your computer and use it in GitHub Desktop.

Select an option

Save Roger8/f524af666fa4e43da9a24ca3c319ca7f to your computer and use it in GitHub Desktop.
numpy using notes
#convert numpy array with dtype of object to array float
arr = np.array([['one', [1, 2, 3]],['two', [4, 5, 6]]], dtype=np.object)
float_arr = np.vstack(arr[:, 1]).astype(np.float)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment