-
-
Notifications
You must be signed in to change notification settings - Fork 26.4k
Closed
Description
With #14375, we should finally standardize how we document the type of parameters and attributes. Once we decide on a style and make changes, we can include a test to enforce the policy.
- Do not use optional. Use
default=.str {'a', 'b'} or float, default=1.0 - Python basic types. (
boolinstead ofboolean) - When defining 1-D shape, use parenthesis.
array-like shape=(n_samples,), None, default=None. - When defining 2-D shape, use parenthesis.
array-like shape=(n_samples, n_features). - str with muliple options:
{'log', 'squared', 'multinomial'} - If there is only one str option the
{}is not needed:algorithm: 'auto' - Only use
orfor separating types.float, int or None, default=None - Only use comma to separate types. Information such as
shapeorstringoptions are defined together. Here is an extreme example:
{'a', 'b'}, float, int, array-like shape=(n_samples,) or None, default=None
- When support array-like and sparse matrix use:
{array-link, sparse matrix} shape=(n_samples, n_features)
amuellerjeremiedbb, adrinjalali and nscozzaro
Metadata
Metadata
Assignees
Labels
No labels