Changed all unsigned ints to numpy ulong_t