append number to vector

Sept. 25, 2001
3:20 p.m.
I often find myself wanting to append a number to a vector. After fumbling experimentation I use def comma(ar,inint): "comma(array,integer) returns array with integer appended" t=array([inint,]) return(concatenate((ar,t),1)) which is used like the comma in apl, i.e. ar <- ar, inint. This seems klutzy to me. Is there a simpler way to do it? If ar were a list, ar.append(inint) works, but no such luck after ar has become an array. Thanks, Henry Harpending, University of Utah
8551
Age (days ago)
8551
Last active (days ago)
0 comments
1 participants
participants (1)
-
Henry Harpending