Skip to content

Commit

Permalink
Fix pre-commit error
Browse files Browse the repository at this point in the history
  • Loading branch information
Saransh-cpp committed Sep 26, 2023
1 parent 654b345 commit 5e83e3d
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions liionpack/solvers.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,8 @@ def setup(
# Set up simulation
self.parameter_values = parameter_values
if initial_soc is not None:
if (
(type(initial_soc) in [float, int])
or (type(initial_soc) is list and len(initial_soc) == 1)
or (type(initial_soc) is np.ndarray and len(initial_soc) == 1)
if (isinstance(initial_soc, (float, int))) or (
isinstance(initial_soc, (list, np.ndarray)) and len(initial_soc) == 1
):
_, _ = lp.update_init_conc(parameter_values, initial_soc, update=True)
else:
Expand Down

0 comments on commit 5e83e3d

Please sign in to comment.