Skip to content

Conversation

@kmp5VT
Copy link
Collaborator

@kmp5VT kmp5VT commented May 14, 2024

This is the proposed solution from issue 1438 and should make it possible now to create a copy Tensor/ITensor from a view of another Tensor/ITensor. I also fixed an additional constructor in UnallocatedArrays that should say UnallocatedX instead of new I am adding a test for that in the unittests now

Fixes #1438.

@kmp5VT kmp5VT requested a review from mtfishman May 14, 2024 13:18
@mtfishman mtfishman changed the title [NDTensors] Address bug in issue [1438](https://github.com/ITensor/ITensors.jl/issues/1438) [NDTensors] Fix issue in Tensor constructor when storage involves wrapper types May 14, 2024
@mtfishman
Copy link
Member

Can you split off the fixes to UnallocatedArrays into a separate PR?

@kmp5VT kmp5VT force-pushed the kmp5/debug/1438 branch from 9276691 to 4a47817 Compare May 14, 2024 18:43
@mtfishman
Copy link
Member

Looks good, thanks. I'm going to double check that this fixes the issue I originally saw in JanReimers/ITensorMPOCompression.jl#7 once I change that over to constructing the ITensor from the storage, but otherwise this looks good to go.

I see a failure in the Metal tests but maybe that is just a random failure unrelated to this PR?

@mtfishman
Copy link
Member

Ok, I checked that this fixes the issue I was seeing in JanReimers/ITensorMPOCompression.jl#7 so I'll merge once tests pass.

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.

[NDTensors] [BUG] Constructing a Tensor from a view of another tensor can fail

2 participants