I need to know if it is possible to save a python list as a numPy array.
相关问题
- how to define constructor for Python's new Nam
- streaming md5sum of contents of a large remote tar
- How to get the background from multiple images by
- Evil ctypes hack in python
- Correctly parse PDF paragraphs with Python
If you look here, it might tell you what you need to know.
http://www.scipy.org/Tentative_NumPy_Tutorial#head-d3f8e5fe9b903f3c3b2a5c0dfceb60d71602cf93
Basically, you can create an array from a sequence.
Or from a sequence of sequences.
I suppose, you mean converting a list into a numpy array? Then,
gives you a as an array of list b in the shape given in reshape.
some list comprehension
Convert the list to a numpy array using the array method specified in the numpy library.
This may be helpful: https://numpy.org/devdocs/user/basics.creation.html