When trying to use LearnerND on 2D data (see issue #466), when calling learner.to_dataframe() function, one gets the exception:
ValueError: point_names (('x', 'y', 'z')) should have the same length as learner.ndims (2)
The issue is caused by the fact, that default values of points_name for LearnerND are point_names: tuple[str, ...] = ("x", "y", "z"),
I believe the similar issue will be observed, if one tries to call to_dataframe with 4D or higher dimensional data, as point names will not be matching the dimension.
Fazit - the default for point_names in to_dataframe make sense only if LearnerND is used with 3D data