nastasiasnk commited on
Commit
898af58
1 Parent(s): b47098f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -214,7 +214,7 @@ def test(input_json):
214
  decay_factors = np.exp(-alpha * DistanceMatrix) * (DistanceMatrix <= threshold)
215
 
216
  # for weighted accessibility (e. g. areas)
217
- if not destinationWeights.empty:
218
  subdomainsAccessibility = pd.DataFrame(index=DistanceMatrix.index, columns=destinationWeights.columns)
219
  for col in destinationWeights.columns:
220
  subdomainsAccessibility[col] = (decay_factors * destinationWeights[col].values).sum(axis=1)
 
214
  decay_factors = np.exp(-alpha * DistanceMatrix) * (DistanceMatrix <= threshold)
215
 
216
  # for weighted accessibility (e. g. areas)
217
+ if destinationWeights is not None: #not destinationWeights.empty:
218
  subdomainsAccessibility = pd.DataFrame(index=DistanceMatrix.index, columns=destinationWeights.columns)
219
  for col in destinationWeights.columns:
220
  subdomainsAccessibility[col] = (decay_factors * destinationWeights[col].values).sum(axis=1)