Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix mypy checks #3052

Merged
merged 1 commit into from
Nov 13, 2023
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
2 changes: 1 addition & 1 deletion src/gluonts/model/evaluation.py
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ def evaluate_forecasts(
)
if index0 is not None:
index0_repeated = np.take(index0, indices=index_arrays[0], axis=0)
index_arrays = (*zip(*index0_repeated), *index_arrays[1:])
index_arrays = (*zip(*index0_repeated), *index_arrays[1:]) # type: ignore
index = pd.MultiIndex.from_arrays(index_arrays)

flattened_metrics = valmap(np.ravel, metrics_values)
Expand Down
4 changes: 2 additions & 2 deletions src/gluonts/mx/model/deepstate/issm.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
# express or implied. See the License for the specific language governing
# permissions and limitations under the License.

from typing import List, Tuple
from typing import List, Sequence, Tuple

from pandas.tseries.frequencies import to_offset

Expand All @@ -31,7 +31,7 @@
)


def _make_block_diagonal(blocks: List[Tensor]) -> Tensor:
def _make_block_diagonal(blocks: Sequence[Tensor]) -> Tensor:
assert (
len(blocks) > 0
), "You need at least one tensor to make a block-diagonal tensor"
Expand Down
Loading