Skip to content

Commit 6aef80d

Browse files
committed
Replace warnings with logging library
1 parent 8e1ee54 commit 6aef80d

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

yasfpy/yasf.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import os
22
import json
33
import yaml
4-
import warnings
54
import logging
65

76
import numpy as np
@@ -53,12 +52,12 @@ def __setup(self):
5352
"The particle geometry file needs at least 4 columns (x, y, z, r) and an optinal refractive index column"
5453
)
5554
elif spheres.shape[1] == 4:
56-
warnings.warn(
55+
self.log.warning(
5756
"4 columns have been provided. Implying that all particles belong to the same material."
5857
)
5958
spheres[4] = np.zeros((spheres.shape[0], 1))
6059
elif spheres.shape[1] >= 5:
61-
warnings.warn(
60+
self.log.warning(
6261
"More than 5 columns have been provided. Everything after the 5th will be ignored!"
6362
)
6463
spheres = spheres.to_numpy()

0 commit comments

Comments
 (0)