Skip to content

Commit

Permalink
Features.freeze: fix starting where boolean array
Browse files Browse the repository at this point in the history
  • Loading branch information
jdtsmith committed Nov 30, 2024
1 parent 353e862 commit 6defaa9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 8 deletions.
2 changes: 1 addition & 1 deletion pahfit/features/features.py
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,7 @@ def freeze(self, param: str, where=None, thaw=False, **keys):
return
if where is None:
if keys:
where = np.zeros_like(self.colnames, dtype=np.bool)
where = np.zeros((len(self[param])), dtype=np.bool)
for k, v in keys.items():
if k in self.colnames:
col = self[k]
Expand Down
9 changes: 2 additions & 7 deletions pahfit/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,13 +138,8 @@ def __repr__(self):
def _repr_html_(self):
return self._status_message() + self.features._repr_html_()

def guess(
self,
spec: Spectrum1D,
redshift=None,
integrate_line_flux=False,
calc_line_fwhm=True,
):
def guess(self, spec: Spectrum1D, redshift=None, integrate_line_flux=False,
calc_line_fwhm=True):
"""Make an initial guess of the physics, based on the given
observational data.
Expand Down

0 comments on commit 6defaa9

Please sign in to comment.