Skip to content

Consistency in documentation #3791

Closed
Closed
@nmayorov

Description

@nmayorov

I think common things in documentation should be written in a consistent way. Right now I can think of the following points:

  1. Whether to name entities which can be transformed to ndarray as array or array-like.

  2. How to list different input options. Should curly braces always be used? For example:

    X : {array-like, sparse matrix}
    
  3. Optional arguments / default values. Some convention should be adopted, like:

    kernel : string, default ’rbf’
    

    or

    kernel : string (default='rbf')
    

    The word optional should be dropped anyway as redundant.

  4. How to name X and y arrays in fit and predict methods. The one adopted convention would be helpful.

  5. How to mention shapes of arrays. I was told that X, shape (n_samples, n_features) was adopted, is it true? How about 1-d arrays: (n_samples) or (n_samples,)?


Anyway, do you think it is an issue at all? Maybe core developers could decide and update coding guidelines? I listed only some points.

Metadata

Metadata

Assignees

No one assigned

    Labels

    DocumentationModerateAnything that requires some knowledge of conventions and best practices

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions