python 3.x - how to construct an array with specific element size in python3? -
you might ask "why don't use c?", try constructing array specific element size using python 3, possible?
i know bytearray() it's limited 1 byte per element, there more flexible function?
also, there equivalent statement in python 3 "sizeof(int)" in c? not talking sys.getsizeof(int) since gives me bytesize of whole int class
x = [none]*10
this initialize list size 10, can take @ arrays numpy module. have lots of other optimization in too.
i don't have experience memory problem, maybe code help? http://code.activestate.com/recipes/546530/
Comments
Post a Comment