Skip to content

signature tests being misled by **kwargs #171

Open
@asmeurer

Description

@asmeurer

The meshgrid signature test fails with cupy:

E           AssertionError: Argument 'indexing' missing from signature
E           assert 'indexing' in odict_keys(['xi', 'kwargs'])
E            +  where 'indexing' = <Parameter "indexing: str = 'xy'">.name
E            +  and   odict_keys(['xi', 'kwargs']) = <built-in method keys of mappingproxy object at 0x7fc946212170>()
E            +    where <built-in method keys of mappingproxy object at 0x7fc946212170> = mappingproxy(OrderedDict([('xi', <Parameter "*xi">), ('kwargs', <Parameter "**kwargs">)])).keys
E            +      where mappingproxy(OrderedDict([('xi', <Parameter "*xi">), ('kwargs', <Parameter "**kwargs">)])) = <Signature (*xi, **kwargs)>.parameters

array_api_tests/test_signatures.py:92: AssertionError

cupy.meshgrid does have the indexing keyword, but its signature is meshgrid(*x, **kwargs). If we can't check a keyword argument directly, we should assume it is present with **kwargs, and let the individual tests suss out whether it really supports it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions