Skip to content

TypeError: 'numpy.float64' object does not support item assignment #69

@FlorinZai

Description

@FlorinZai

Hello,

Runs fine until this point:

gdf_list = [(gda_lib.ATL08_2_gdf(x,dataset_dict)) for x in ATL08_list]
gdf_colombia = gda_lib.concat_gdf(gdf_list)


TypeError Traceback (most recent call last)
d:\DRIVE\SCIENCE_Projects\ICESATDEM\IS2_DEM_comparison_WIP.ipynb Cell 40 in 1
----> 1 gdf_list = [(gda_lib.ATL08_2_gdf(x,dataset_dict)) for x in ATL08_list]
2 gdf_colombia = gda_lib.concat_gdf(gdf_list)

d:\DRIVE\SCIENCE_Projects\ICESATDEM\IS2_DEM_comparison_WIP.ipynb Cell 40 in 1
----> 1 gdf_list = [(gda_lib.ATL08_2_gdf(x,dataset_dict)) for x in ATL08_list]
2 gdf_colombia = gda_lib.concat_gdf(gdf_list)

File d:\drive\github\topohack\topolib\gda_lib.py:129, in ATL08_2_gdf(ATL06_fn, dataset_dict)
126 dataset_dict['land_segments'].append('longitude')
127 #use Ben's Scripts to convert to dict
--> 129 data_dict = ATL08_to_dict(ATL06_fn,dataset_dict)
130 #this will give us 6 tracks
131 i = 0

File d:\drive\github\topohack\topolib\gda_lib.py:105, in ATL08_to_dict(filename, dataset_dict)
103 bad = temp[dataset]==fill_value
104 temp[dataset]=np.float64(temp[dataset])
--> 105 temp[dataset][bad]=np.NaN
106 except KeyError as e:
107 pass

TypeError: 'numpy.float64' object does not support item assignment

Thanks,

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions