mirror of
https://github.com/wassname/scikit-image.git
synced 2026-07-28 11:25:42 +08:00
Merge pull request #1573 from jni/contributing-array-coords
DOC: Add array coords and Cython-Python wrapping to new contributors guide
This commit is contained in:
@@ -152,6 +152,10 @@ Stylistic Guidelines
|
||||
* When documenting array parameters, use ``image : (M, N) ndarray``
|
||||
and then refer to ``M`` and ``N`` in the docstring, if necessary.
|
||||
|
||||
* Refer to array dimensions as (plane), row, column, not as x, y, z. See
|
||||
:ref:`Coordinate conventions <numpy-images-coordinate-conventions>`
|
||||
in the user guide for more information.
|
||||
|
||||
* 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
|
||||
@@ -162,6 +166,10 @@ Stylistic Guidelines
|
||||
* Use ``Py_ssize_t`` as data type for all indexing, shape and size variables
|
||||
in C/C++ and Cython code.
|
||||
|
||||
* Wrap Cython code in a pure Python function, which defines the API. This
|
||||
improves compatibility with code introspection tools, which are often not
|
||||
aware of Cython code.
|
||||
|
||||
Test coverage
|
||||
-------------
|
||||
|
||||
|
||||
@@ -130,6 +130,8 @@ the grayscale image above:
|
||||
>>> plt.imshow(cat)
|
||||
|
||||
|
||||
.. _numpy-images-coordinate-conventions:
|
||||
|
||||
Coordinate conventions
|
||||
----------------------
|
||||
|
||||
|
||||
Reference in New Issue
Block a user