[Numpy-discussion] "formstring()" in place?

Janko Hauser jhauser at ifm.uni-kiel.de
Fri Nov 3 15:15:06 CST 2000


Sorry I forgot to mention that these two operations can be done
inplace, but the result can not be stored inplace, as the shape is
changing. So you need to live with one copy, if your array a is of
type 'i'.

>>> a=array([1,2,3,4])
>>> multiply(a,bits,a)
array([       1,      512,   196608, 67108864]) 
>>> a
array([       1,      512,   196608, 67108864])

HTH,
__Janko



multiply(array([1,2,3,4]),bits,a)








More information about the Numpy-discussion mailing list