-
Notifications
You must be signed in to change notification settings - Fork 25
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
Infinite recursion in wrapped arrays #145
Conversation
@@ -18,6 +18,9 @@ struct FillVector <: AbstractVector{Float64} | |||
len::Int | |||
end | |||
|
|||
Base.size(x::FillVector) = (x.len,) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This has just been moved
Do we care about Julia nightly failed tests? |
I don't think so. @nickrobinson251 any thoughts? I wonder whether this is a good way to solve this problem. In particular, it requires that whichever Tackling the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Tests on Nightly version of Julia don't matter (they look entirely unrelated to this PR)
@@ -54,7 +54,7 @@ function to_vec(x::AbstractVector) | |||
end | |||
|
|||
function to_vec(x::AbstractArray) | |||
x_vec, from_vec = to_vec(vec(x)) | |||
x_vec, from_vec = to_vec(collect(vec(x))) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
x_vec, from_vec = to_vec(collect(vec(x))) | |
# `collect` to avoid recursion in wrapped arrays | |
x_vec, from_vec = to_vec(collect(vec(x))) |
Having slept on it it's probably best to not merge this and just define a The long term plan is to get rid of |
It is indeed the plan. |
Can I suggest revisiting this PR? I found it was needed to make DifferentiationInterface.jl work with FiniteDifferences.jl, see #141 (comment) |
Closes #141