Skip to content

Instantly share code, notes, and snippets.

@sgbaird
Last active August 14, 2023 11:24
Show Gist options
  • Save sgbaird/e4b29c64ecf8295b88ce72296a89f2c4 to your computer and use it in GitHub Desktop.
Save sgbaird/e4b29c64ecf8295b88ce72296a89f2c4 to your computer and use it in GitHub Desktop.
{{! Numpy Docstring Template }}
{{summaryPlaceholder}}
{{extendedSummaryPlaceholder}}
{{#parametersExist}}
Parameters
----------
{{#args}}
{{var}} : {{typePlaceholder}}
{{descriptionPlaceholder}}
{{/args}}
{{#kwargs}}
{{var}} : {{typePlaceholder}}, optional
{{descriptionPlaceholder}}, by default {{&default}}
{{/kwargs}}
{{/parametersExist}}
{{#returnsExist}}
Returns
-------
{{#returns}}
{{typePlaceholder}}
{{descriptionPlaceholder}}
{{/returns}}
{{/returnsExist}}
{{#yieldsExist}}
Yields
------
{{#yields}}
{{typePlaceholder}}
{{descriptionPlaceholder}}
{{/yields}}
{{/yieldsExist}}
{{#exceptionsExist}}
Raises
------
{{#exceptions}}
{{type}}
{{descriptionPlaceholder}}
{{/exceptions}}
{{/exceptionsExist}}
Examples
--------
>>> {{name}}({{#args}}{{var}}, {{/args}}, {{#kwargs}}{{var}}={{&default}}, {{/kwargs}})
OUTPUT
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment