File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11"""Plotting utilities."""
22
3+ import json
34import os
5+ import sys
6+ import warnings
47from pathlib import Path
58
69import pandas as pd
@@ -32,10 +35,7 @@ def create_example_plots(
3235 if "SMOKE_TEST" in os .environ :
3336 return
3437
35- # Lazily import required packages
36- import json
37- import sys
38-
38+ # Lazily import optional packages which are now required
3939 import matplotlib .pyplot as plt
4040 import seaborn as sns
4141
@@ -52,8 +52,6 @@ def create_example_plots(
5252 while not script_path .name == "baybe" and script_path != script_path .parent :
5353 script_path = script_path .parent
5454 if script_path == script_path .parent :
55- import warnings
56-
5755 warnings .warn ("No themes for plotting found. A default theme is used." )
5856 themes = {"check" : {"font_scale" : 1.75 , "rc_params" : {}}}
5957 else :
@@ -77,6 +75,4 @@ def create_example_plots(
7775 )
7876 plt .clf ()
7977 else :
80- import warnings
81-
8278 warnings .warn ("No keyword arguments were provided when plotting." )
You can’t perform that action at this time.
0 commit comments