From bb9ebfc8f90a0183de96aa0f047f74414e495359 Mon Sep 17 00:00:00 2001 From: Jan Petykiewicz Date: Sat, 18 Apr 2020 01:37:53 -0700 Subject: [PATCH] Generate a warning instead of printing --- fatamorgana/basic.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fatamorgana/basic.py b/fatamorgana/basic.py index eb4d706..01ea395 100644 --- a/fatamorgana/basic.py +++ b/fatamorgana/basic.py @@ -8,6 +8,7 @@ from enum import Enum import math import struct import io +import warnings try: import numpy @@ -1038,8 +1039,7 @@ class GridRepetition: if self.b_count < 2: self.b_count = None self.b_vector = None - print('Warning: removed b_count and b_vector since b_count == 1') - # TODO: warn here + warnings.warn('Removed b_count and b_vector since b_count == 1') if self.a_count < 2: raise InvalidDataError('Repetition has too-small x-count: '