Christopher Barker skrev:
However, Python lists hold python objects, so it's bit inefficient, at
least in terms of memory use.
I guess that is mainly in terms of memory use, as the Python (scalar)
objects must be created for the call to append. np.array([]) can also be
inefficient, as Anne
Sturla Molden wrote:
Christopher Barker skrev:
However, Python lists hold python objects, so it's bit inefficient, at
least in terms of memory use.
I guess that is mainly in terms of memory use, as the Python (scalar)
objects must be created for the call to append. np.array([]) can also be
Has anyone got any advice about array creation. I've been using numpy
for a long time and have just noticed something unexpected about array
concatenation.
It seems that using numpy.array([a,b,c]) is around 20 times slower
than creating an empty array and adding the individual elements.
Other
I will be out of office till 8. August
For urgent matters, please contact patrick.lambe...@heliotis.ch
___
NumPy-Discussion mailing list
NumPy-Discussion@scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion
I will be out of office till 8. August
For urgent matters, please contact patrick.lambe...@heliotis.ch
___
NumPy-Discussion mailing list
NumPy-Discussion@scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion
I will be out of office till 8. August
For urgent matters, please contact patrick.lambe...@heliotis.ch
___
NumPy-Discussion mailing list
NumPy-Discussion@scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion
I will be out of office till 8. August
For urgent matters, please contact patrick.lambe...@heliotis.ch
___
NumPy-Discussion mailing list
NumPy-Discussion@scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion
I will be out of office till 8. August
For urgent matters, please contact patrick.lambe...@heliotis.ch
___
NumPy-Discussion mailing list
NumPy-Discussion@scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion
I will be out of office till 8. August
For urgent matters, please contact patrick.lambe...@heliotis.ch
___
NumPy-Discussion mailing list
NumPy-Discussion@scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion
I will be out of office till 8. August
For urgent matters, please contact patrick.lambe...@heliotis.ch
___
NumPy-Discussion mailing list
NumPy-Discussion@scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion
I will be out of office till 8. August
For urgent matters, please contact patrick.lambe...@heliotis.ch
___
NumPy-Discussion mailing list
NumPy-Discussion@scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion
I will be out of office till 8. August
For urgent matters, please contact patrick.lambe...@heliotis.ch
___
NumPy-Discussion mailing list
NumPy-Discussion@scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion
I will be out of office till 8. August
For urgent matters, please contact patrick.lambe...@heliotis.ch
___
NumPy-Discussion mailing list
NumPy-Discussion@scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion
On Thu, Jul 15, 2010 at 5:54 AM, John Porter jpor...@cambridgesys.com wrote:
Has anyone got any advice about array creation. I've been using numpy
for a long time and have just noticed something unexpected about array
concatenation.
It seems that using numpy.array([a,b,c]) is around 20 times
You're right - I screwed up the timing for the one that works...
It does seem to be faster.
I've always just built arrays using nx.array([]) in the past though
and was surprised
that it performs so badly.
On Thu, Jul 15, 2010 at 2:41 PM, Skipper Seabold jsseab...@gmail.com wrote:
On Thu, Jul
Le jeudi 15 juillet 2010 à 16:05 +0100, John Porter a écrit :
You're right - I screwed up the timing for the one that works...
It does seem to be faster.
I've always just built arrays using nx.array([]) in the past though
and was surprised that it performs so badly.
Can anyone provide an
On Thu, Jul 15, 2010 at 11:05 AM, John Porter jpor...@cambridgesys.com wrote:
You're right - I screwed up the timing for the one that works...
It does seem to be faster.
I've always just built arrays using nx.array([]) in the past though
and was surprised
that it performs so badly.
On
ok - except that vstack doesn't seem to work for 2d arrays (without a
reshape) which is what I'm actually after.
The difference between the numpy.concatenate version and numpy.array is fairly
impressive though, I get a factor of 50x. It would be nice to know why.
On Thu, Jul 15, 2010 at 4:15
On Thu, Jul 15, 2010 at 12:23 PM, John Porter jpor...@cambridgesys.com wrote:
ok - except that vstack doesn't seem to work for 2d arrays (without a
reshape) which is what I'm actually after.
Ah, then you might want hstack. There is also a column_stack and
row_stack if you need to go that
On Thu, Jul 15, 2010 at 12:38 PM, Sturla Molden stu...@molden.no wrote:
Sorry for the previous mispost.
This thread remids me of something I've though about for a while: Would
NumPy benefit from an np.ndarraylist subclass of np.ndarray, that has an
O(1) amortized append like Python lists?
20 matches
Mail list logo