I have had this problem before. At the time, I imported random a number of times. This time I import numpy a single time among all modules. EDITED Using None might have been the problem. But still not working with 0. Minimal example working, so it’s deeper in the code and not about importing anything […]
- Tags (1 - industries[i].p_skill)]) income = self.seed.lognormal(industries[i].income_mean, 15:48:22) [GCC 7.3.0] :: Anaconda, age=ages[i], as I pass self) is how I calculate the gini coefficient: def calculate_gini(incomes, false, female=females[i], I have had this problem before. At the time, I imported random a number of times. This time I import numpy a single time among all modules. EDITED Using None might have been the problem, Inc. on linux, income=income) self.persons.append(person) Details: This was produced in Linux Mint latest version 20.1 Ulyssa Python 3.7.7 (def, industries[i].income_variance) person = Person(_id=str(i), industry=industries[i], Mar 26 2020, model): # Sort smallest to largest cumm = model.np.sort(incomes) # Values cannot be 0 cumm += .00001 # Find cumulative to, n + 1) gini = ((model.np.sum((2 * index - n - 1) * cumm)) / (n * model.np.sum(cumm))) return gini So. My question is: what are other, p=[i.size for i in self.industries.values()], p=[industries[i].p_skill, seed=0): self.np = np self.seed = self.np.random.RandomState(seed) Note the max_distance is exactly the same. But the coeffi, self.params['MAX_AGE'], size=n) females = self.seed.choice([True, size=n) for i in range(n): skilled = self.seed.choice([True, size=n) industries = self.seed.choice(list(self.industries.values()), skill=skilled, so it's deeper in the code and not about importing anything (the example imports the same modules)... EDITED2 I'm now guessing it has to do, this is not a simple problem as the straight answer may suggest. It's actually a hard problem. I use the code: import numpy as np class Mo