[SciPy-user] Concatenate without making a copy? + sandbox: models

Vincent Nijs v-nijs at kellogg.northwestern.edu
Wed Jan 3 21:00:05 CST 2007


If x is:


And d = {'x0':x[:,0], 'x1':x[:,1]}

Would d['x0'] and d['x1'] be next to each other in memory?


> Vincent Nijs wrote:
>> If:
>> d = {'a':array([1,2,3]), 'b':array([4,3,5])}
>> Is is possible to do something like c_[d['a'],d['b']] in scipy without
>> making a copy?
> No. In general the data will not be next to each other in memory, so they must
> be copied to create a single concatenated array.

More information about the SciPy-user mailing list