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

Inserting and extracting FSAs from Array blocks #139

Open
c42f opened this issue Jul 7, 2016 · 1 comment
Open

Inserting and extracting FSAs from Array blocks #139

c42f opened this issue Jul 7, 2016 · 1 comment

Comments

@c42f
Copy link
Collaborator

c42f commented Jul 7, 2016

@awbsmith needs something for constructing FSAs from parts of a larger AbstractArray, but without allocating a temporary.

The main issue here is choosing the right name. slice and sub are right out due to 0.5 vs 0.4 compatibility. view seems like the right thing, with exactly the same syntax and semantics as Base.view in 0.5, but with an extra parameter to specify the output type:

view(Mat{3,3}, A, 1:3,1:3)   # produces Mat{3,3,eltype(A)}(A[1:3,1:3])

Symmetrically, we should also have the ability to set blocks in Arrays to a given FSA:

A[1:3,1:3] = eye(Mat{3,3,Float64})
@andyferris
Copy link
Contributor

👍 to using the view(Type, array, indices...) syntax.

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

No branches or pull requests

2 participants