numpy.append and persisting original datatype
24 Jul
2010
24 Jul
'10
7:08 p.m.
On Sat, Jul 24, 2010 at 4:14 PM, Martin Galpin <galpin@gmail.com> wrote:
Hello,
Given the following example:
float32 foo = np.append(foo, 1)
import numpy as np foo = np.array([], dtype=np.float32) print a.dtype print foo.dtype
float64
Is this the correct behaviour? I realise that numpy.append() returns a new copy of foo but is it the correct behaviour that the original datatype is not persisted? If so, should this not be noted in the documentation?
Forgive me if I have missed something.
Best wishes
-- Martin
I have moved this over to the numpy-discussion list. Ben Root
5288
Age (days ago)
5288
Last active (days ago)
0 comments
1 participants
participants (1)
-
Benjamin Root