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

Change AbstractVector to AbstractArray{T,1} #45

Merged
merged 1 commit into from
Aug 23, 2023
Merged

Change AbstractVector to AbstractArray{T,1} #45

merged 1 commit into from
Aug 23, 2023

Conversation

mBarreau
Copy link
Contributor

Currently, it is not possible to use slices of a matrix in TaylorDiff because this is not of type AbstractVector (see https://discourse.julialang.org/t/speed-up-compilation-with-zygote-and-pinn/99652/4 where a conversion is needed)

This PR changes the type AbstractVector{N} to AbstractArray{T,1}, allowing the use of subvectors.

@tansongchen tansongchen merged commit 1aa65d7 into JuliaDiff:main Aug 23, 2023
3 of 4 checks passed
@tansongchen
Copy link
Member

Hi, this is definitely reasonable and thanks for help.

@tansongchen
Copy link
Member

Wait, @mBarreau , isn't it that AbstractVector and AbstractArray{T, 1} are the same thing?

julia> AbstractVector
AbstractVector (alias for AbstractArray{T, 1} where T)

@mBarreau
Copy link
Contributor Author

@tansongchen
I did not see you replied. Indeed it is, I was incorrect on the source of the error (I worked on an old version of TaylorDiff initially).
The problem with the current code is that x and l must be of same type. This is something I talk about in the other PR: #47

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

Successfully merging this pull request may close these issues.

2 participants