From: Simon B. <si...@ar...> - 2006-05-21 02:44:30
|
On Sun, 21 May 2006 12:28:10 +0100 Simon Burton <si...@ar...> wrote: > > >>> a=numpy.array([1,2,3],numpy.Int8) > >>> a > array([1, 2, 3], dtype=int8) > >>> a*2 > array([2, 4, 6], dtype=int16) > >>> > > My little 2 lives happily as an int8, so why is the int8 array > cast to an int16 ? As a workaround, i found this: >>> a*=2 >>> a array([2, 4, 6], dtype=int8) Simon. -- Simon Burton, B.Sc. Licensed PO Box 8066 ANU Canberra 2601 Australia Ph. 61 02 6249 6940 http://arrowtheory.com |