Skip to content
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

A parametric problem #1166

Closed
wants to merge 1 commit into from
Closed

A parametric problem #1166

wants to merge 1 commit into from

Conversation

AaronNZH
Copy link
Contributor

@AaronNZH AaronNZH commented Mar 8, 2022

meshgrid() got an unexpected keyword argument 'indexing'

I got the above error when using. And official document sayig that
torch.meshgrid(*tensors) currently has the same behavior as calling numpy.meshgrid(*arrays, indexing=’ij’).
In the future torch.meshgrid will transition to indexing=’xy’ as the default.

Anyway, it work after removing the parameter now.

meshgrid() got an unexpected keyword argument 'indexing'

I got the above error when using.
The parameter transitioned to indexing=’xy’ as the default, and it will work after changing like these.
@FateScript
Copy link
Member

Thanks, maybe a better way of fixing this is

def meshgrid(*tensor):
    if torch_ver > 1.xxx:
        return torch.meshgrid(*tesnor, indexing="ij")
    else:
         return torch.meshgrid(*tensor)

@FateScript
Copy link
Member

Long time no reply. I will close this PR. Similar feature could be found in #1189 .
Thanks @AaronNZH for contribution anyway.

@FateScript FateScript closed this Mar 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants