try using numpy.identity instead