Skip to content

Commit 7bbb708

Browse files
committed
explicitly list input particle types in docstrings
1 parent f288bef commit 7bbb708

File tree

2 files changed

+15
-15
lines changed

2 files changed

+15
-15
lines changed

pyapr/tree/fill_tree.py

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -27,15 +27,15 @@ def fill_tree_mean(apr: APR,
2727
----------
2828
apr: APR
2929
Input APR data structure.
30-
parts: ParticleData
30+
parts: ByteParticles, ShortParticles, FloatParticles or LongParticles
3131
Input APR particle values.
32-
output: ParticleData, optional
33-
(optional) Particle data object for the output values. If provided, the type must either be FloatParticles
32+
output: ByteParticles, ShortParticles, FloatParticles or LongParticles, optional
33+
Particle data object for the output values. If provided, the type must either be FloatParticles
3434
or the same type as ``parts``. If None, generates a new object of the same type as ``parts``. (default: None)
3535
3636
Returns
3737
-------
38-
output: ParticleData
38+
output: ByteParticles, ShortParticles, FloatParticles or LongParticles
3939
The computed tree values.
4040
"""
4141
_check_input(apr, parts)
@@ -54,15 +54,15 @@ def fill_tree_max(apr: APR,
5454
----------
5555
apr: APR
5656
Input APR data structure.
57-
parts: ParticleData
57+
parts: ByteParticles, ShortParticles, FloatParticles or LongParticles
5858
Input APR particle values.
59-
output: ParticleData, optional
60-
(optional) Particle data object for the output values. If provided, the type must either be FloatParticles
59+
output: ByteParticles, ShortParticles, FloatParticles or LongParticles, optional
60+
Particle data object for the output values. If provided, the type must either be FloatParticles
6161
or the same type as ``parts``. If None, generates a new object of the same type as ``parts``. (default: None)
6262
6363
Returns
6464
-------
65-
output: ParticleData
65+
output: ByteParticles, ShortParticles, FloatParticles or LongParticles
6666
The computed tree values.
6767
"""
6868
_check_input(apr, parts)
@@ -81,15 +81,15 @@ def fill_tree_min(apr: APR,
8181
----------
8282
apr: APR
8383
Input APR data structure.
84-
parts: ParticleData
84+
parts: ByteParticles, ShortParticles, FloatParticles or LongParticles
8585
Input APR particle values.
86-
output: ParticleData, optional
87-
(optional) Particle data object for the output values. If provided, the type must either be FloatParticles
86+
output: ByteParticles, ShortParticles, FloatParticles or LongParticles, optional
87+
Particle data object for the output values. If provided, the type must either be FloatParticles
8888
or the same type as ``parts``. If None, generates a new object of the same type as ``parts``. (default: None)
8989
9090
Returns
9191
-------
92-
output: ParticleData
92+
output: ByteParticles, ShortParticles, FloatParticles or LongParticles
9393
The computed tree values.
9494
"""
9595
_check_input(apr, parts)

pyapr/tree/tree_ops.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@ def sample_from_tree(apr: APR,
1919
----------
2020
apr: APR
2121
Input APR data structure.
22-
parts: ByteParticles, ShortParticles, FloatParticles, LongParticles
22+
parts: ByteParticles, ShortParticles, FloatParticles or LongParticles
2323
Input APR particle values.
24-
tree_parts: ByteParticles, ShortParticles, FloatParticles, LongParticles
24+
tree_parts: ByteParticles, ShortParticles, FloatParticles or LongParticles
2525
Input APR tree values. Must either be of type FloatParticles or the same type as `parts`.
2626
num_levels: int
2727
Sample values from level `apr.level_max()-num_levels`. If `num_levels=1`, each particle takes the value
@@ -32,7 +32,7 @@ def sample_from_tree(apr: APR,
3232
3333
Returns
3434
-------
35-
output: ByteParticles, ShortParticles, FloatParticles, LongParticles
35+
output: ByteParticles, ShortParticles, FloatParticles or LongParticles
3636
The resampled particle values.
3737
"""
3838
_check_input(apr, parts)

0 commit comments

Comments
 (0)