-
Notifications
You must be signed in to change notification settings - Fork 58
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
FDataGrid.copy
argument sample _names
default behaviour
#588
Comments
I wanted since a long time to rework the classes used to represent functions, in order to make them more general and move them to a separate package. Thus, some of the design choices taken for scikit-fda will be revisited. In particular, I agree that metadata attributes, such as As for the |
I personally don't know these packages at all, so I would not be able to give you any insight at the moment.
I don't have any strong opinion, but my main observation would be that it is currently impossible to set any argument to skeleton.copy(data_matrix=data_matrix) # Raises error if data_matrix has different number of samples
skeleton.copy(data_matrix=data_matrix, sample_names=None) # Actively deleting sample names This way, no sample name is silently deleted, but if the user encounters this error, she/he can fix it more easily. As for implementation detail, I don't know what the best practise would be. Creating a def copy(self: T, *, data_matrix=DEF, grid_points=DEF, [...]) -> T There might be more pythonic ways I don't know of. |
Hello,
I sometimes use a "skeleton" for a
FDataGrid
instance, containing no samples but lots of information (grid points, domain_range, interpolation, etc...).I would like, given a new
data_matrix
(generated from another process), to create an instance following the skeleton, with:but the problem with that, is that
copy
isn't happy with the fact that I don't give sample names.I can easily fix this with
but I think the default behaviour of
copy
might be changed for a smoother use. What do you think?Another possibility could be to turn to
concatenate
and allow it to be used with adata_matrix
argument and not onlyFDataGrid
instances.The text was updated successfully, but these errors were encountered: