Change nd.empty(shape, type) into nd.empty(shape, dtype)