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

fancy slicing does not seem to work with extended indexing operator #593

Closed
nilsbecker opened this issue Jul 22, 2021 · 5 comments
Closed

Comments

@nilsbecker
Copy link
Contributor

open Owl.Dense.Ndarray.D
let a = uniform [|3;3|];;
get_fancy [I 2; R[0;1]] a;;
a.!{I 2; R [0;1]};;

the last line gives

Error: Unbound value .!{}
Hint: Did you mean .${} or .%{}?

on ocaml 4.12. i was unable to dig up the place where the indexing operators are defined as merlin was of no particular help.

@mseri
Copy link
Member

mseri commented Jul 22, 2021

They are defined in the owl_operator.ml file, have a look at this PR: #543

@mseri
Copy link
Member

mseri commented Jul 22, 2021

In particular, I think you would need to add it to the Make_Ndarray functor

@nilsbecker
Copy link
Contributor Author

ah ok. the book seemed to imply that this was already included.

@mseri
Copy link
Member

mseri commented Jul 22, 2021

I think it would be convenient to have them. I cannot speak for everybody but I would be favourable to a PR introducing them, especially since there is a discrepancy with the documentation

@jzstark
Copy link
Collaborator

jzstark commented Sep 30, 2024

The example code seems to work ok in the current version of Owl.

@jzstark jzstark closed this as completed Sep 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants