Skip to content

Commit

Permalink
fix doctest
Browse files Browse the repository at this point in the history
  • Loading branch information
mtsch committed May 7, 2024
1 parent ab2e9e8 commit c37a748
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/Hamiltonians/geometry.jl
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,12 @@ end
julia> geometry = Geometry((3,4));
julia> reshape(Offsets(geometry), (3,4))
3×4 reshape(::Offsets{2}, 3, 4) with eltype StaticArraysCore.SVector{2, Int64}:
[0, 0] [0, 1] [0, 2] [0, 3]
[1, 0] [1, 1] [1, 2] [1, 3]
[2, 0] [2, 1] [2, 2] [2, 3]
julia> reshape(Offsets(geometry; center=true), (3,4))
3×4 reshape(::Offsets{2}, 3, 4) with eltype StaticArraysCore.SVector{2, Int64}:
[-1, -1] [-1, 0] [-1, 1] [-1, 2]
[0, -1] [0, 0] [0, 1] [0, 2]
Expand Down

0 comments on commit c37a748

Please sign in to comment.