What are the differences between python's numpy.ndarray and list datatypes? I have vague ideas, but would like to get a definitive answer about:
Thanks!
There are several differences:
I prefer to use numpy arrays when I need to do some mathematical operations (sum, average, array multiplication, etc) and list when I need to iterate in 'items' (strings, files, etc).
I read from various links and resources and summarize my understanding as below:
The main benefits of using numpy arrays should be smaller memory consumption and better runtime behavior.
One of the main advantages of NumPy is its advantage in time compared to standard Python.
Good Explanation : https://www.python-course.eu/numpy.php
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.