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

view(::MatElem, ::Int, ::Int) errors #1718

Open
joschmitt opened this issue May 29, 2024 · 0 comments
Open

view(::MatElem, ::Int, ::Int) errors #1718

joschmitt opened this issue May 29, 2024 · 0 comments

Comments

@joschmitt
Copy link
Collaborator

This doesn't work:

julia> M = matrix(ZZ, [ 1 2 3 ; 4 5 6])
[1   2   3]
[4   5   6]

julia> view(M, 1, 1)
ERROR: StackOverflowError:
Stacktrace:
 [1] view(M::AbstractAlgebra.Generic.MatSpaceElem{BigInt}, rows::Int64, cols::Int64) (repeats 79984 times)
   @ AbstractAlgebra ~/.julia/dev/AbstractAlgebra/src/Matrix.jl:432

With Julia matrices it does:

julia> view(M.entries, 1, 1)
0-dimensional view(::Matrix{BigInt}, 1, 1) with eltype BigInt:
1

I guess we would have to add a type MatSpaceScalarView (?) to the view interface? Also this particular view function

function Base.view(M::MatElem,
seems very fishy to me.

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

1 participant