is it possible to slice Array2D in F#?
say,
let tmp =Array2D.init 100 100 (fun x y -> x * 100 + y)
how to retrieve some columns or some rows from tmp like tmp.[0,1..]?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Yes. It’s easy to grab 2D chunks:
However, if you want a 1D slice, I believe you’ll need to project it out of a 2D slice