Skip to content

Clarify theta argument validation error message #82

@raphaelreinauer

Description

@raphaelreinauer

In src/ect/ect.py:84-87:

        if theta is not None and graph_dim != 2:
            raise ValueError(
                "Theta must be provided for 2D graphs. "
                "Use 'directions' or 'num_dirs' to specify directions."
            )

The condition rejects theta for non-2D graphs, but the message says theta "must be provided for 2D graphs", which is the opposite.

Suggested fix:

raise ValueError(
    "theta is only supported for 2D graphs. "
    "Use 'directions' or 'num_dirs' for higher dimensions."
)

Part of this JOSS review.

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