Is there a way to limit size of a list in Python, so it does not use all memory?
bumsfeld
413
Nearly a Posting Virtuoso
Recommended Answers
Jump to PostHi bumsfeld,
I believe that the array data structure in the Numeric/NumPy package is both typed and non-resizable, just like C arrays (actually, I'm pretty sure that these data structures are C arrays wearing a Python hat). Check out:
Jump to PostThanks G-Do for your information, so NumPy eventually replaces Numeric and Numarray. Interesting!
When I was coding in C, I used to sample lab data and put it into a circular or ring buffer to keep the thing from overflowing. This was an easy way to calculate a moving …
All 5 Replies
G-Do
19
Junior Poster
vegaseat
1,735
DaniWeb's Hypocrite
Team Colleague
bumsfeld
413
Nearly a Posting Virtuoso
wrybread
0
Newbie Poster
vegaseat
1,735
DaniWeb's Hypocrite
Team Colleague
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.