mirror of
https://github.com/wassname/scikit-image.git
synced 2026-06-30 13:13:00 +08:00
DOC: More coding conventions.
This commit is contained in:
@@ -58,7 +58,19 @@ Stylistic Guidelines
|
||||
|
||||
cimport numpy as cnp # in Cython code
|
||||
|
||||
* When documenting array parameters, use ``image : (M, N) ndarray``,
|
||||
``image : (M, N, 3) ndarray`` and then refer to ``M`` and ``N`` in the
|
||||
docstring.
|
||||
* Set up your editor to remove trailing whitespace.
|
||||
* If a function name, say ``segment(...)``, has the same name as the file in
|
||||
which it is implemented, name that file ``_segment.py`` so that it can still
|
||||
be imported.
|
||||
* Functions should support all input image dtypes. Use utility functions such
|
||||
as ``img_as_float`` to help convert to an appropriate type. The output
|
||||
format can be whatever is most efficient. This allows us to string together
|
||||
several functions into a pipeline, e.g.::
|
||||
|
||||
hough(canny(my_image))
|
||||
|
||||
Test coverage
|
||||
`````````````
|
||||
|
||||
Reference in New Issue
Block a user