Skip to content

Commit f70ac0c

Browse files
committed
docs: reverting some docstring array shape info
1 parent f5790d2 commit f70ac0c

5 files changed

Lines changed: 9 additions & 9 deletions

File tree

README.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -94,14 +94,14 @@ For type hinting and docstring styling, try to keep the
9494
Code Reference readable in the documentation website.
9595
If in doubt just ask, or look at the examples in the codebase.
9696

97-
* Simple type combintions such as `float` or `str | pathlib.Path`
97+
* Simple type combintions such as ``float`` or ``str | pathlib.Path``
9898
should be included as type hints, but do not need to be included
9999
in the docstring parameter description.
100100
* More involved type hints can have extra information in the
101-
docstring. For example for numpy arrays, `npt.NDArray[np.bool]` doesn't
101+
docstring. For example for numpy arrays, ``npt.NDArray[np.bool]`` doesn't
102102
render in a readable way in the Code Reference, and doesn't include shape.
103103
Therefore, you can also keep the docstring parameter description e.g.,
104-
`binary ndarray of shape (M, N)`.
104+
``binary ndarray of shape (M, N)``.
105105

106106

107107
Incrementing version

dclab/features/emodulus/scale_linear.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ def convert(area_um: npt.NDArray,
2121
tuple[npt.NDArray, npt.NDArray] |
2222
tuple[npt.NDArray, npt.NDArray, npt.NDArray]
2323
):
24-
"""convert area-deformation-emodulus triplet
24+
"""Convert area-deformation-emodulus triplet
2525
2626
The conversion formula is described in :cite:`Mietke2015`.
2727

dclab/features/emodulus/viscosity.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,7 @@ def get_viscosity_mc_pbs_herold_2017(
258258

259259

260260
def get_viscosity_water_kestin_1978(
261-
temperature: float = 23.0) -> float | npt.NDArray:
261+
temperature: float | npt.NDArray = 23.0) -> float | npt.NDArray:
262262
"""Compute the viscosity of water according to :cite:`Kestin_1978`"""
263263
# see equation (15) in Kestin et al, J. Phys. Chem. 7(3) 1978
264264
check_temperature("'kestin-1978' water", temperature, 0, 40)

dclab/features/inert_ratio.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ def cont_moments_cv(cont: npt.NDArray,
1616
1717
Parameters
1818
----------
19-
cont: shape (N,2)
19+
cont: ndarray of shape (N,2)
2020
The contour for which to compute the moments.
2121
flt_epsilon
2222
The value of ``FLT_EPSILON`` in OpenCV/gcc.

dclab/features/volume.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ def counter_clockwise(cx: npt.NDArray, cy: npt.NDArray) -> tuple[float, float]:
138138
139139
Parameters
140140
----------
141-
cx, cy
141+
cx, cy: 1d ndarrays
142142
The x- and y-coordinates of the contour
143143
144144
Returns
@@ -193,9 +193,9 @@ def vol_revolve(r: npt.NDArray,
193193
194194
Parameters
195195
----------
196-
r
196+
r: 1d ndarray
197197
radial coordinates (perpendicular to the z axis)
198-
z
198+
z: 1d ndarray
199199
coordinate along the axis of rotation
200200
point_scale
201201
point size in your preferred units; The volume is multiplied

0 commit comments

Comments
 (0)