8000 `axis`/`dims` default value in `concatenate` · Issue #903 · kymatio/kymatio · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

axis/dims default value in concatenate #903

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
lostanlen opened this issue Jul 7, 2022 · 0 comments
Open

axis/dims default value in concatenate #903

lostanlen opened this issue Jul 7, 2022 · 0 comments
Labels
API Issues in user-facing code management

Comments

@lostanlen
Copy link
Collaborator
lostanlen commented Jul 7, 2022

While rebasing PR #871 i noticed that our concatenate operator has strange default values for dims:

Here's backend/numpy_backend.py:

    @classmethod
    def concatenate(cls, arrays, dim=1):
        return cls._np.stack(arrays, axis=dim)

Here's backend/tensorflow_backend.py:

    @staticmethod
    def concatenate(arrays, dim=1):
        return tf.stack(arrays, axis=dim)

Here's backend/torch_backend.py:

   @staticmethod
    def concatenate(arrays, dim=2):
        return torch.stack(arrays, dim=dim)

I'm a bit confused by this dim=2 default value. And not too happy that the kwargs is called dim instead of axis, which would be more compliant with the Python Array API.

Our decision here will affect the semantics of #902

@eickenberg thoughts?

@lostanlen lostanlen added management API Issues in user-facing code labels Jul 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API Issues in user-facing code management
Projects
None yet
Development

No branches or pull requests

1 participant
0