MAINT: change variable name 'iter' to 'nit' -- these names are used interchangeably in the code, but 'iter' is a python built-in function