From e5bbceac1f88bbbf83a24d64b5646ecca4fb575f Mon Sep 17 00:00:00 2001 From: Stefan van der Walt Date: Mon, 20 Aug 2012 11:19:58 -0700 Subject: [PATCH] DOC: More coding conventions. --- DEVELOPMENT.txt | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/DEVELOPMENT.txt b/DEVELOPMENT.txt index 3f10276d..e205af85 100644 --- a/DEVELOPMENT.txt +++ b/DEVELOPMENT.txt @@ -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 `````````````