-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
bugSomething isn't workingSomething isn't working
Milestone
Description
Describe the bug
After converting 2.3.0 input to 2.4.0 (apparently correctly), user runs into following error:
Traceback (most recent call last):
File "p:\11211534-008-25mad09a-ovd\C_Work\573_sobek-ovd-j24_6-v2a1\731_FM2Prof\779_Run_FM2Prof\fm2prof_CSS.py", line 17, in <module>
project.run(overwrite=True)
File "C:\Projecten\Hyridem\OVD\venv\Lib\site-packages\fm2prof\fm2prof_runner.py", line 146, in run
success = self._run_inifile()
^^^^^^^^^^^^^^^^^^^
File "C:\Projecten\Hyridem\OVD\venv\Lib\site-packages\fm2prof\fm2prof_runner.py", line 200, in _run_inifile
self._initialise_fm2prof()
File "C:\Projecten\Hyridem\OVD\venv\Lib\site-packages\fm2prof\fm2prof_runner.py", line 246, in _initialise_fm2prof
self._set_fm_model_data(
File "C:\Projecten\Hyridem\OVD\venv\Lib\site-packages\fm2prof\fm2prof_runner.py", line 449, in _set_fm_model_data
time_independent_data, edge_data = nearest_neighbour.classify_with_regions(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Projecten\Hyridem\OVD\venv\Lib\site-packages\fm2prof\nearest_neighbour.py", line 47, in classify_with_regions
css_2d_nodes = neigh.predict(np.array([x_2d_node, y_2d_node]).T)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Projecten\Hyridem\OVD\venv\Lib\site-packages\sklearn\neighbors\_classification.py", line 274, in predict
neigh_ind = self.kneighbors(X, return_distance=False)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Projecten\Hyridem\OVD\venv\Lib\site-packages\sklearn\neighbors\_base.py", line 838, in kneighbors
X = validate_data(
^^^^^^^^^^^^^^
File "C:\Projecten\Hyridem\OVD\venv\Lib\site-packages\sklearn\utils\validation.py", line 2954, in validate_data
out = check_array(X, input_name="X", **check_params)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Projecten\Hyridem\OVD\venv\Lib\site-packages\sklearn\utils\validation.py", line 1128, in check_array
raise ValueError(
ValueError: Found array with 0 sample(s) (shape=(0, 2)) while a minimum of 1 is required by KNeighborsClassifier.
To Reproduce
Bug reproduced with 2.4.0
Expected behavior
Clear error message instead of exception
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working