Skip to content

Suggestion: Move this static method out of the class #76

@mpvanderschelling

Description

@mpvanderschelling

Problem

Move this static method out of the class and make it a module-level function. This will make it easier to test and reuse.

Proposed solution

def fiber_volume(radius: float) -> float:
    """calculate the fiber volume of the current fiber

    Parameters
    ----------
    radius : float
        radius

    Returns
    -------
    vol:float
        volume of current fiber(disk)
    """
    return (4 / 3) * np.pi * radius**3

Assignees:
Labels:

@staticmethod
def fiber_volume(radius: float) -> float:
"""calculate the fiber volume of the current fiber
Parameters
----------
radius : float
radius
Returns
-------
vol:float
volume of current fiber(disk)
"""
return (4 / 3) * np.pi * radius**3

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions