diff --git a/.github/workflows/cd.yaml b/.github/workflows/cd.yaml index c951fd76..6f2adff5 100644 --- a/.github/workflows/cd.yaml +++ b/.github/workflows/cd.yaml @@ -58,7 +58,7 @@ jobs: ls -ltrh ls -ltrh dist - name: Publish to Test PyPI - uses: pypa/gh-action-pypi-publish@v1.12.2 + uses: pypa/gh-action-pypi-publish@v1.12.3 with: repository-url: https://test.pypi.org/legacy/ verbose: true @@ -96,5 +96,5 @@ jobs: name: artifact path: dist - - uses: pypa/gh-action-pypi-publish@v1.12.2 + - uses: pypa/gh-action-pypi-publish@v1.12.3 if: startsWith(github.ref, 'refs/tags') diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 1f7f06b5..83f8fe3c 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -57,7 +57,7 @@ repos: # args: ["--fix", "--show-fixes"] - repo: https://github.com/pre-commit/mirrors-mypy - rev: "v1.13.0" + rev: "v1.14.1" hooks: - id: mypy files: src diff --git a/astrophot/models/_shared_methods.py b/astrophot/models/_shared_methods.py index c00b3b26..be31ef0d 100644 --- a/astrophot/models/_shared_methods.py +++ b/astrophot/models/_shared_methods.py @@ -180,7 +180,7 @@ def parametric_segment_initialize( return # Get the sub-image area corresponding to the model image target_area = target[model.window] - target_dat = target_area.data.detach().cpu().numpy() + target_dat = target_area.data.detach().cpu().numpy().copy() if target_area.has_mask: mask = target_area.mask.detach().cpu().numpy() target_dat[mask] = np.median(target_dat[np.logical_not(mask)]) @@ -477,7 +477,7 @@ def spline_segment_initialize( profR = parameters["I(R)"].prof.detach().cpu().numpy() target_area = target[self.window] - target_dat = target_area.data.detach().cpu().numpy() + target_dat = target_area.data.detach().cpu().numpy().copy() if target_area.has_mask: mask = target_area.mask.detach().cpu().numpy() target_dat[mask] = np.median(target_dat[np.logical_not(mask)]) @@ -578,7 +578,7 @@ def relspline_initialize(self, target=None, parameters=None, **kwargs): super(self.__class__, self).initialize(target=target, parameters=parameters) target_area = target[self.window] - target_dat = target_area.data.detach().cpu().numpy() + target_dat = target_area.data.detach().cpu().numpy().copy() if target_area.has_mask: mask = target_area.mask.detach().cpu().numpy() target_dat[mask] = np.median(target_dat[np.logical_not(mask)]) diff --git a/astrophot/models/galaxy_model_object.py b/astrophot/models/galaxy_model_object.py index 7bad13b8..bbe2ec57 100644 --- a/astrophot/models/galaxy_model_object.py +++ b/astrophot/models/galaxy_model_object.py @@ -63,7 +63,7 @@ def initialize(self, target=None, parameters: Optional[Parameter_Node] = None, * if not (parameters["PA"].value is None or parameters["q"].value is None): return target_area = target[self.window] - target_dat = target_area.data.detach().cpu().numpy() + target_dat = target_area.data.detach().cpu().numpy().copy() if target_area.has_mask: mask = target_area.mask.detach().cpu().numpy() target_dat[mask] = np.median(target_dat[np.logical_not(mask)]) diff --git a/astrophot/models/multi_gaussian_expansion_model.py b/astrophot/models/multi_gaussian_expansion_model.py index dd71726b..d6f42da8 100644 --- a/astrophot/models/multi_gaussian_expansion_model.py +++ b/astrophot/models/multi_gaussian_expansion_model.py @@ -62,7 +62,7 @@ def initialize(self, target=None, parameters=None, **kwargs): super().initialize(target=target, parameters=parameters) target_area = target[self.window] - target_dat = target_area.data.detach().cpu().numpy() + target_dat = target_area.data.detach().cpu().numpy().copy() if target_area.has_mask: mask = target_area.mask.detach().cpu().numpy() target_dat[mask] = np.median(target_dat[np.logical_not(mask)]) diff --git a/astrophot/models/point_source.py b/astrophot/models/point_source.py index 6c8a3552..a05cc350 100644 --- a/astrophot/models/point_source.py +++ b/astrophot/models/point_source.py @@ -47,7 +47,7 @@ def initialize(self, target=None, parameters=None, **kwargs): if parameters["flux"].value is not None: return target_area = target[self.window] - target_dat = target_area.data.detach().cpu().numpy() + target_dat = target_area.data.detach().cpu().numpy().copy() with Param_Unlock(parameters["flux"]), Param_SoftLimits(parameters["flux"]): icenter = target_area.plane_to_pixel(parameters["center"].value) edge = np.concatenate(