Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

3
  • I would ask why you want to do that instead of just keeping the array, but you can "split" on the spaces. arr = numpy.array(s.split(' ')) Commented Nov 22, 2019 at 11:25
  • @ChristianSloper I am writing these numpy arrays to csv files (gets written as shown in example) and i want to be able to read them back as numpy arrays Commented Nov 22, 2019 at 11:27
  • Use savetext() from numpy to store them properly Commented Nov 22, 2019 at 11:29