-
Notifications
You must be signed in to change notification settings - Fork 25
Observers.jl is broken by this package #100
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
Comments
Thanks for the report. Those are some sketchy definitions, and anyway |
Note that this would get fixed by #91, we'll look into getting that merged. |
By the way, I didn't appreciate the fact that |
This should be fixed now that #91 is merged, let us know if you have any issues. |
Uh oh!
There was an error while loading. Please reload this page.
I've found that creating an observer (from the package
Observers.jl
) whileITensorInfiniteMPS
is loaded causes an error. This is because on line 130 of the fileITensors.jl
, you define a method forBase.copy
:ITensorInfiniteMPS.jl/src/ITensors.jl
Line 130 in cc42d94
However, in
Observers.jl
, the constructor creates a dataframe with columns initialised toUnion{}[]
, and in the process of creating this dataframe, these columns are copied. SinceT <: Union{}
for allT
, and since anIndexSet = Vector{Index}
, technicallyVector{Union{}} <: IndexSet
and it uses the new definition ofBase.copy
. This immediately fails because, of course, this is not actually an index set andITensors.data(is)
is undefined. I think essentially what's happened here is accidental type piracy.MWE
Below is a MWE showing that that creating an observer works fine until
ITensorInfiniteMPS
is loaded:NB: you can get the same stack trace with
df = DataFrame("foo" => Union{}[])
Workarounds
ITensors.data(is) = is
, so thatBase.copy
works correctly on the empty columnobserver(args; copycols=false)
, avoiding the use ofBase.copy
.The text was updated successfully, but these errors were encountered: