Skip to content

Commit

Permalink
TYP: fix typecheck time error
Browse files Browse the repository at this point in the history
  • Loading branch information
neutrinoceros committed Oct 11, 2022
1 parent 9c9681d commit cb4fb07
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 4 deletions.
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[metadata]
name = yt_idefix
version = 0.13.3
version = 0.13.4
description = An extension module for yt, adding a frontend for Idefix
long_description = file: README.md
long_description_content_type = text/markdown
Expand Down
2 changes: 1 addition & 1 deletion yt_idefix/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
# immediately after `import yt.extensions.idefix`
from yt_idefix.api import *

__version__ = "0.13.3"
__version__ = "0.13.4"
11 changes: 9 additions & 2 deletions yt_idefix/data_structures.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from abc import ABC, abstractmethod
from functools import cached_property
from importlib.metadata import version
from typing import Literal, Sequence
from typing import Literal

import inifix
import numpy as np
Expand Down Expand Up @@ -147,7 +147,14 @@ def _cell_centers(self):
# with unit "code_length" and dtype float64
...

def _icoords_to_fcoords(self, icoords, ires, axes: Sequence[int] = (0, 1, 2)):
def _icoords_to_fcoords(
self,
icoords: np.ndarray,
ires: np.ndarray,
axes: tuple[int, ...] | None = None,
):
if axes is None:
axes = (0, 1, 2)
# this is needed to support projections
coords = np.empty(icoords.shape, dtype="f8")
cell_widths = np.empty(icoords.shape, dtype="f8")
Expand Down

0 comments on commit cb4fb07

Please sign in to comment.