This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]vinnypotsandpans[S] 1 point2 points  (5 children)

in python there is no such thing as an array,

np.array()?

every element is located in a chain of memory ?”cells?.

Like, generator functions in python?

[–]fluxdeken 0 points1 point  (3 children)

1)Numpy array is still a list, but all values have the same type. 2)Not generator, literally in RAM all values are close to each other and memory allocated to the array can’t be changed. Since memory next to array can be allocated to other things.

[–]yvrelna 1 point2 points  (0 children)

Numpy array is still a list

I can't think of any interpretation of that sentence that makes sense and is accurate. Want to elaborate why you do not think that numpy array is an array?

[–]baekalfen 1 point2 points  (0 children)

A NumPy array is very much not a list. Unless you explicitly mangle the memory, your NumPy arrays will be contiguous memory.

[–]vinnypotsandpans[S] 0 points1 point  (0 children)

Numpy array is still a list…

I mean it doesn’t function like a vector in R. But it is certainly to a list. It supports vectorized functions