Skip to content

Add a FiniteDifferences extension - #53

Merged
kshyatt merged 1 commit into
mainfrom
ksh/fd
Aug 7, 2026
Merged

Add a FiniteDifferences extension#53
kshyatt merged 1 commit into
mainfrom
ksh/fd

Conversation

@kshyatt

@kshyatt kshyatt commented Aug 7, 2026

Copy link
Copy Markdown
Member

This is needed for QuantumKitHub/TensorKit.jl#493 and I want to avoid type piracy there :). FD doesn't know how to read StridedViews correctly on its own, which is why the ChainRules tests were failing over there.

@kshyatt
kshyatt requested a review from lkdvos August 7, 2026 15:30
using FiniteDifferences

function FiniteDifferences.to_vec(x::StridedView)
x_vec, from_vec = FiniteDifferences.to_vec(Array(x))

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do you know if this is an extra copy we might be able to avoid?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried it (removing the Array) back at TensorKit and the tests all started blowing up again, unfortunately

Comment thread ext/StridedViewsFiniteDifferencesExt.jl
@codecov

codecov Bot commented Aug 7, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 4 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
ext/StridedViewsFiniteDifferencesExt.jl 0.00% 4 Missing ⚠️
Files with missing lines Coverage Δ
ext/StridedViewsFiniteDifferencesExt.jl 0.00% <0.00%> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@kshyatt
kshyatt merged commit 94f124f into main Aug 7, 2026
10 of 14 checks passed
@kshyatt
kshyatt deleted the ksh/fd branch August 7, 2026 18:15
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