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.

Required fields*

3
  • 5
    What about lists of strings, lists of non-numeric objects, etc... ? Commented Oct 12, 2016 at 14:55
  • 2
    This answer should be better posted here: stackoverflow.com/questions/6294179/… Commented Feb 10, 2019 at 10:58
  • 1
    This is the best one I have read. numpy arrays are far more efficient than Python lists. If the list is short it's no problem making a copy of it from a Python list, if it isn't then perhaps the developer should consider storing the elements in numpy array in the first place. Commented Jan 28, 2020 at 12:23