Also I can not reproduce this error (older NumPY version) you can try to do an active cast. >>> a[kwd,kwd]=temp.astype('b')[0] As a side note, if you want to know the type you can use the typecode() method on arrays. temp.typecode() HTH, __Janko