Skip to content

Error: Boolean index shape mismatch (163 vs 287) #609

@LITIDisma

Description

@LITIDisma

Hello, i loaded a mapped reference line into QGIS, along with 84 transects. In the configuration, set settings['max_dist_ref'] = 500. When running the script, an error appears in the reject_outliers function, specifically:

File "C:\Coastsat\CoastSat-master\Atacama.py", line 397, in
cross_distance = SDS_transects.reject_outliers(cross_distance,output,settings_outliers)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Coastsat\CoastSat-master\coastsat\SDS_transects.py", line 456, in reject_outliers
chainage[~np.array(idx_kept)] = np.nan
~~~~~~~~^^^^^^^^^^^^^^^^^^^^^
IndexError: boolean index did not match indexed array along dimension 0; dimension is 163 but corresponding boolean dimension is 287

I'm not sure what’s causing this mismatch or what to check to resolve it. Any guidance would be greatly appreciated.

Thank you very much in advance.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions