Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions src/deepc/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
from .lti import DiscreteLTI, RandomNoiseDiscreteLTI
from .deepc import deePC
from .controller import Controller

__all__ = ["DiscreteLTI", "RandomNoiseDiscreteLTI", "deePC", "Controller"]
__all__ = ["DiscreteLTI", "RandomNoiseDiscreteLTI", "Controller"]
13 changes: 12 additions & 1 deletion src/deepc/controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,18 @@
from typing import Callable
import numpy as np
from .math import hankel_matrix, projected_gradient_method
from .deepc import as_column_vector, check_dimensions


def as_column_vector(v: list | np.ndarray) -> np.ndarray:
v = np.array(v)
if v.ndim == 1:
return v.reshape(-1, 1)
return v


def check_dimensions(var: np.ndarray, name: str, size: int, dims: int) -> None:
"Checks the dimensions of a variable."
assert var.shape == (size, dims), f"{name}.shape={var.shape} but should be ({size}, {dims})."


class Controller:
Expand Down
140 changes: 0 additions & 140 deletions src/deepc/deepc.py

This file was deleted.

1 change: 0 additions & 1 deletion src/deepc/math.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import math
from typing import Callable
import numpy as np

Expand Down
2 changes: 0 additions & 2 deletions src/deepcpp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ add_library(
algorithm.cpp
controller.h
controller.cpp
deepc.h
deepc.cpp
finite_queue.h
finite_queue.cpp
lti.h
Expand Down
136 changes: 0 additions & 136 deletions src/deepcpp/deepc.cpp

This file was deleted.

60 changes: 0 additions & 60 deletions src/deepcpp/deepc.h

This file was deleted.

Loading