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

[ should treat Tensors indices as 1-based #516

Open
t-kalinowski opened this issue Mar 10, 2022 · 1 comment
Open

[ should treat Tensors indices as 1-based #516

t-kalinowski opened this issue Mar 10, 2022 · 1 comment

Comments

@t-kalinowski
Copy link
Member

We should change [ so it no longer passes tensors through as-is, but translates then from 1-based to 0-based (This would help prevent nasty surprises when people wrap functions in tf_function().

e.g.,

x <- as_tensor(1:10)
i <- 1L
x[i] == x[as_tensor(i)] 
@t-kalinowski t-kalinowski changed the title [ should translate Tensors from 1-based to 0-based [ should treat Tensors indices as 1-based Mar 11, 2022
@t-kalinowski
Copy link
Member Author

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 a pull request may close this issue.

1 participant