nastasiasnk commited on
Commit
3b7be5c
1 Parent(s): 68e8a9a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -38,7 +38,7 @@ def test(input_json):
38
  decay_factors = np.exp(-alpha * DistanceMatrix) * (DistanceMatrix <= threshold)
39
  subdomainsAccessibility = pd.DataFrame(index=DistanceMatrix.index, columns=weightsNames) #destinationWeights.columns)
40
  # for weighted accessibility (e. g. areas)
41
- if destinationWeights!=None:
42
  for col,columnName in zip(destinationWeights.columns, weightsNames):
43
  subdomainsAccessibility[columnName] = (decay_factors * destinationWeights[col].values).sum(axis=1)
44
  # for unweighted accessibility (e. g. points of interest)
 
38
  decay_factors = np.exp(-alpha * DistanceMatrix) * (DistanceMatrix <= threshold)
39
  subdomainsAccessibility = pd.DataFrame(index=DistanceMatrix.index, columns=weightsNames) #destinationWeights.columns)
40
  # for weighted accessibility (e. g. areas)
41
+ if not destinationWeights.empty:
42
  for col,columnName in zip(destinationWeights.columns, weightsNames):
43
  subdomainsAccessibility[columnName] = (decay_factors * destinationWeights[col].values).sum(axis=1)
44
  # for unweighted accessibility (e. g. points of interest)