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
8 changes: 4 additions & 4 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ jobs:
name: Build & Upload Artifact
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- uses: actions/setup-python@v3
- uses: actions/setup-python@v5
with:
python-version: "3.10"

Expand All @@ -38,7 +38,7 @@ jobs:
working-directory: ./docs

- name: Upload artifact
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: docs
path: docs/_build
Expand All @@ -49,7 +49,7 @@ jobs:
needs: build-docs
if: contains(github.ref, 'tags')
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: actions/[email protected]
with:
name: docs
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/test_and_deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@ jobs:
python-version: ['3.10', '3.11', '3.12']

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

Expand All @@ -54,7 +54,7 @@ jobs:
run: python -m tox

- name: Upload pytest test results
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: pytest-results-${{ matrix.platform }} py${{ matrix.python-version }}
path: reports/
Expand Down Expand Up @@ -83,9 +83,9 @@ jobs:
permissions:
id-token: write
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v2
uses: actions/setup-python@v5
with:
python-version: "3.x"
- name: Install build
Expand Down
8 changes: 4 additions & 4 deletions src/napari_matplotlib/histogram.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
def _get_bins(
data: npt.NDArray[Any],
num_bins: int = 100,
) -> npt.NDArray[Any]:
) -> npt.NDArray[np.floating]:
"""Create evenly spaced bins with a given interval.

Parameters
Expand Down Expand Up @@ -161,13 +161,13 @@ def draw(self) -> None:
for i, c in enumerate("rgb"):
self.axes.hist(
data[..., i].ravel(),
bins=bins.tolist(),
bins=bins.tolist(), # type: ignore[arg-type]
label=c,
histtype="step",
color=_COLORS[c],
)
else:
self.axes.hist(data.ravel(), bins=bins.tolist(), label=layer.name)
self.axes.hist(data.ravel(), bins=bins.tolist(), label=layer.name) # type: ignore[arg-type]

self._contrast_lines = [
self.axes.axvline(lim, color="white")
Expand Down Expand Up @@ -297,7 +297,7 @@ def draw(self) -> None:

bins = _get_bins(data)

_, bins, patches = self.axes.hist(data, bins=bins.tolist())
_, bins, patches = self.axes.hist(data, bins=bins.tolist()) # type: ignore[arg-type]
patches = cast(BarContainer, patches)

# recolor the histogram plot
Expand Down