Spaces:
Sleeping
Sleeping
Update imports_utils.py
Browse files- imports_utils.py +6 -6
imports_utils.py
CHANGED
@@ -330,7 +330,7 @@ def getDataFromGrasshopper(
|
|
330 |
):
|
331 |
|
332 |
if inputNameMatrix is not None:
|
333 |
-
matrix =
|
334 |
dfMatrix_gh = pd.DataFrame(matrix).T
|
335 |
dfMatrix_gh = dfMatrix_gh.apply(pd.to_numeric, errors='coerce')
|
336 |
dfMatrix_gh = dfMatrix_gh.replace([np.inf, -np.inf], 10000).fillna(0)
|
@@ -339,7 +339,7 @@ def getDataFromGrasshopper(
|
|
339 |
matrix = None
|
340 |
|
341 |
if inputNameLanduse is not None:
|
342 |
-
landuses =
|
343 |
dfLanduses_gh = pd.DataFrame(landuses).T
|
344 |
dfLanduses_gh = dfLanduses_gh.apply(pd.to_numeric, errors='coerce')
|
345 |
dfLanduses_gh = dfLanduses_gh.replace([np.inf, -np.inf], 0).fillna(0) # cleaning function?
|
@@ -349,25 +349,25 @@ def getDataFromGrasshopper(
|
|
349 |
|
350 |
|
351 |
if inputNameAttributeMapper is not None:
|
352 |
-
attributeMapperDict_gh =
|
353 |
else:
|
354 |
attributeMapperDict_gh = None
|
355 |
|
356 |
if inputNameLanduseMapper is not None:
|
357 |
-
landuseMapperDict_gh =
|
358 |
else:
|
359 |
landuseMapperDict_gh = None
|
360 |
|
361 |
|
362 |
if inputNameAlpha is not None:
|
363 |
-
alpha =
|
364 |
if alpha is None:
|
365 |
alpha = alphaDefault
|
366 |
else:
|
367 |
alpha = alphaDefault
|
368 |
|
369 |
if inputNameThreshold is not None:
|
370 |
-
threshold =
|
371 |
if threshold is None:
|
372 |
threshold = thresholdDefault
|
373 |
else:
|
|
|
330 |
):
|
331 |
|
332 |
if inputNameMatrix is not None:
|
333 |
+
matrix = inputJson['input'][inputNameMatrix]
|
334 |
dfMatrix_gh = pd.DataFrame(matrix).T
|
335 |
dfMatrix_gh = dfMatrix_gh.apply(pd.to_numeric, errors='coerce')
|
336 |
dfMatrix_gh = dfMatrix_gh.replace([np.inf, -np.inf], 10000).fillna(0)
|
|
|
339 |
matrix = None
|
340 |
|
341 |
if inputNameLanduse is not None:
|
342 |
+
landuses = inputJson['input'][inputNameLanduse]
|
343 |
dfLanduses_gh = pd.DataFrame(landuses).T
|
344 |
dfLanduses_gh = dfLanduses_gh.apply(pd.to_numeric, errors='coerce')
|
345 |
dfLanduses_gh = dfLanduses_gh.replace([np.inf, -np.inf], 0).fillna(0) # cleaning function?
|
|
|
349 |
|
350 |
|
351 |
if inputNameAttributeMapper is not None:
|
352 |
+
attributeMapperDict_gh = inputJson['input'][inputNameAttributeMapper]
|
353 |
else:
|
354 |
attributeMapperDict_gh = None
|
355 |
|
356 |
if inputNameLanduseMapper is not None:
|
357 |
+
landuseMapperDict_gh = inputJson['input'][inputNameLanduseMapper]
|
358 |
else:
|
359 |
landuseMapperDict_gh = None
|
360 |
|
361 |
|
362 |
if inputNameAlpha is not None:
|
363 |
+
alpha = inputJson['input'][inputNameAlpha]
|
364 |
if alpha is None:
|
365 |
alpha = alphaDefault
|
366 |
else:
|
367 |
alpha = alphaDefault
|
368 |
|
369 |
if inputNameThreshold is not None:
|
370 |
+
threshold = inputJson['input'][inputNameThreshold]
|
371 |
if threshold is None:
|
372 |
threshold = thresholdDefault
|
373 |
else:
|