From 5429d76b510b2f20ee628ff0fcfd3dc9fece04d8 Mon Sep 17 00:00:00 2001 From: jan Date: Thu, 7 Jul 2022 16:11:59 -0700 Subject: [PATCH] fix cases with single vector --- masque/file/oasis.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/masque/file/oasis.py b/masque/file/oasis.py index 8c5d52d..aa82ab2 100644 --- a/masque/file/oasis.py +++ b/masque/file/oasis.py @@ -698,11 +698,15 @@ def repetition_masq2fata( Tuple[int, int]]: frep: Union[fatamorgana.GridRepetition, fatamorgana.ArbitraryRepetition, None] if isinstance(rep, Grid): + a_vector = rint_cast(rep.a_vector) + b_vector = rint_cast(rep.b_vector) if rep.b_vector is not None else None + a_count = rint_cast(rep.a_count) + b_count = rint_cast(rep.b_count) if rep.b_count is not None else None frep = fatamorgana.GridRepetition( - a_vector=rint_cast(rep.a_vector), - b_vector=rint_cast(rep.b_vector), - a_count=rint_cast(rep.a_count), - b_count=rint_cast(rep.b_count), + a_vector=a_vector, + b_vector=b_vector, + a_count=a_count, + b_count=b_count, ) offset = (0, 0) elif isinstance(rep, Arbitrary):