I think more explanation is needed here of the size dependence, i.e. ,

    In [6]: (np.zeros((2,), dtype=np.uint8) + np.int16(255)).dtypeOut[6]: dtype('uint8')
    Out[6]: dtype('uint8')

    In [7]: (np.zeros((2,), dtype=np.uint8) + np.int16(256)).dtype
    Out[7]: dtype('uint16')