Convert Length¶
Particula-beta Index / Particula Beta / Data / Util / Convert Length
Auto-generated documentation for particula_beta.data.util.convert_length module.
get_length_from_volume¶
Show source in convert_length.py:9
Calculates a length (radius or diameter) from a given volume for a sphere.
Arguments¶
volume- The volume of the shape.dimension- The dimension to return – "radius" or "diameter".
Returns¶
The requested length (radius or diameter) as a float.
Signature¶
def get_length_from_volume(
volume: Union[float, NDArray[np.float64]], dimension: str = "radius"
) -> float: ...
get_volume_from_length¶
Show source in convert_length.py:27
Calculates a volume from a given length (radius or diameter) for a sphere.
Arguments¶
length- The length specifying the shape's size (radius or diameter).dimension- Specifies whether the input is a "radius" or a "diameter".
Returns¶
The corresponding volume as a float.
Signature¶
def get_volume_from_length(
length: Union[float, NDArray[np.float64]], dimension: str = "radius"
) -> float: ...