Skip to content

Inconsistent arguments in some helper functions #100

Closed
@asmeurer

Description

@asmeurer

For example, in assert_dtype, the in_dtype is before out_dtype

def assert_dtype(
func_name: str,
in_dtype: Union[DataType, Sequence[DataType]],
out_dtype: DataType,
expected: Optional[DataType] = None,
*,
repr_name: str = "out.dtype",
):
in assert_keepdimable_shape the in_shape is after out_shape
def assert_keepdimable_shape(
func_name: str,
out_shape: Shape,
in_shape: Shape,
axes: Tuple[int, ...],
keepdims: bool,
/,
**kw,
):

By the way, it would be useful to have small docstrings for the various helper functions.

Metadata

Metadata

Assignees

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