Make ==
, hash
not depend on canonicalize?
#231
Labels
Structural Tangent
Related to the `Tangent` type for structured (composite) values
#230
made
==
andhash
usecanonicalize
.JuliaDiff/FiniteDifferences.jl#111 does the same to
FiniteDifferences.to_vec
this is a problem if ever we are having fields that for example match to the properties rather than the fields.
This was brought up in JuliaDiff/ChainRules.jl#285 (comment)
One option might be to introduce a Maybe we should have a
canonicalize(x, mode=propertynames)
or just always usepropertynames
rather thanfieldnames
But specifically for these cases:
For
isequals
instead we should probably check that any fields not in both areiszero
.For
hash
we might be able to drop any fields that areiszero
or maybe just any that areZero
.to_vec
is harder and not for this repo.The text was updated successfully, but these errors were encountered: