Skip to content

Commit 47a3434

Browse files
adienesclaudemtfishman
authored andcommitted
Fix incorrect one-arg Base.hash for Block in NDTensors (ITensor#1716)
Co-authored-by: Claude <noreply@anthropic.com> Co-authored-by: Matt Fishman <mtfishman@users.noreply.github.com>
1 parent a230f5c commit 47a3434

2 files changed

Lines changed: 2 additions & 3 deletions

File tree

NDTensors/Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name = "NDTensors"
22
uuid = "23ae76d9-e61a-49c4-8f12-3f1a16adf9cf"
3-
version = "0.4.22"
3+
version = "0.4.23"
44
authors = ["Matthew Fishman <mfishman@flatironinstitute.org>"]
55

66
[workspace]

NDTensors/src/blocksparse/block.jl

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -140,8 +140,7 @@ else
140140
end
141141
end
142142

143-
hash(b::Block) = UInt(b.hash)
144-
hash(b::Block, h::UInt) = h + hash(b)
143+
hash(b::Block, h::UInt) = hash(b.hash, h)
145144

146145
#
147146
# Custom NTuple{N, Int} hashes

0 commit comments

Comments
 (0)