> Well you still have the original x in memory so you should at least
> expect a doubling of the memory. The remaining memory might be
> temporary stuff allocated during the conversion although that seems
> weird. You can add:
>
> del x
> import gc
> gc.collect()
>
> Anyway this simulation is probably not representative of your scenario
> as integers can be unboxed in the array datastructure hence the copy
> while string objects cannot and the array will only store references
> to the original string objects.
>
I don't think this is the problem.
I observed something similar to Christian yesterday.
When using ``np.asarray`` on a list of strings used 10-100x the memory
of the list, while ``np.array`` used very little memory.
I haven't look into it more closely as that, though.

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Scikit-learn-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/scikit-learn-general

Reply via email to