From c37a7489f1336be20d05e6ccad658ada49beccc2 Mon Sep 17 00:00:00 2001 From: mtsch Date: Tue, 7 May 2024 21:36:06 +1200 Subject: [PATCH] fix doctest --- src/Hamiltonians/geometry.jl | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/Hamiltonians/geometry.jl b/src/Hamiltonians/geometry.jl index 2654cf85b..d0070d21d 100644 --- a/src/Hamiltonians/geometry.jl +++ b/src/Hamiltonians/geometry.jl @@ -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]