Commit 1ab99a1a authored by Cecilia Nievas's avatar Cecilia Nievas
Browse files

Fixed issue with undesired tab spacings

parent 9dd8653e
......@@ -49,7 +49,7 @@ def write_admin_unit_to_hdf(adm_unit_id, adm_level,
Length equal to bdg_proportions.
bdg_proportions (array of floats): proportions in which each building class of
bdg_classes is present in adm_unit_id. Its elements
must add up to 1.0. Length equal to bdg_classes.
must add up to 1.0. Length equal to bdg_classes.
num_bdgs (float): total number of buildings in adm_unit_id.
num_dwells (float): total number of dwellings in adm_unit_id.
num_ppl (float): total number of people in adm_unit_id.
......@@ -95,8 +95,8 @@ def write_admin_unit_to_hdf(adm_unit_id, adm_level,
del fle[adm_unit_id]["Bdg_classes"]
dt=h5py.special_dtype(vlen=str)
dataset_classes = fle[adm_unit_id].create_dataset("Bdg_classes",
bdg_proportions.shape,
dtype=dt)
bdg_proportions.shape,
dtype=dt)
dataset_classes[:] = np.array(bdg_classes)
# Write dataset of proportions of buildings. It will replace it if it already
......@@ -104,8 +104,8 @@ def write_admin_unit_to_hdf(adm_unit_id, adm_level,
if "Vals" in fle[adm_unit_id]:
del fle[adm_unit_id]["Vals"]
dataset_props = fle[adm_unit_id].create_dataset("Vals",
bdg_proportions.shape,
dtype="float64")
bdg_proportions.shape,
dtype="float64")
dataset_props[:] = bdg_proportions
# Close HDF5 file (important!):
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment