Skip to content

Commit 92fbd7e

Browse files
committed
Format logging output for production, consumption, net consumption, and prices to suppress scientific notation
1 parent 554103d commit 92fbd7e

1 file changed

Lines changed: 10 additions & 8 deletions

File tree

src/batcontrol/core.py

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -318,14 +318,16 @@ def run(self):
318318

319319
net_consumption = consumption-production
320320

321-
logger.debug('Production Forecast: %s',
322-
np.ndarray.round(production, 1))
323-
logger.debug('Consumption Forecast: %s',
324-
np.ndarray.round(consumption, 1))
325-
logger.debug('Net Consumption Forecast: %s',
326-
np.ndarray.round(net_consumption, 1))
327-
logger.debug('Prices: %s', np.ndarray.round(
328-
prices, self.round_price_digits))
321+
# Format arrays consistently for logging (suppress scientific notation)
322+
with np.printoptions(suppress=True):
323+
logger.debug('Production Forecast: %s',
324+
production.round(1))
325+
logger.debug('Consumption Forecast: %s',
326+
consumption.round(1))
327+
logger.debug('Net Consumption Forecast: %s',
328+
net_consumption.round(1))
329+
logger.debug('Prices: %s',
330+
prices.round(self.round_price_digits))
329331
# negative = charging or feed in
330332
# positive = dis-charging or grid consumption
331333

0 commit comments

Comments
 (0)