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

[pre-commit.ci] pre-commit autoupdate #45

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
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
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ ci:

repos:
- repo: https://github.com/psf/black
rev: 24.8.0
rev: 24.10.0
hooks:
- id: black
# It is recommended to specify the latest version of Python
Expand All @@ -19,7 +19,7 @@ repos:
# https://pre-commit.com/#top_level-default_language_version
language_version: python3
- repo: https://github.com/psf/black
rev: 24.8.0
rev: 24.10.0
hooks:
- id: black-jupyter
language_version: python3
Expand Down
5 changes: 3 additions & 2 deletions hierarc/Diagnostics/goodness_of_fit.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,9 @@ def __init__(self, kwargs_likelihood_list, kwargs_model):

def reduced_chi2(self, cosmo, kwargs_lens, kwargs_kin):
"""Reduced chi^2 of fit."""
logL = self._sample_likelihood.log_likelihood(cosmo=cosmo, kwargs_lens=kwargs_lens, kwargs_kin=kwargs_kin,
verbose=False)
logL = self._sample_likelihood.log_likelihood(
cosmo=cosmo, kwargs_lens=kwargs_lens, kwargs_kin=kwargs_kin, verbose=False
)
num_data = self._sample_likelihood.num_data()
return -logL * 2 / num_data

Expand Down
3 changes: 1 addition & 2 deletions hierarc/Likelihood/LensLikelihood/double_source_plane.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,7 @@ def num_data(self):


def beta_double_source_plane(z_lens, z_source_1, z_source_2, cosmo):
"""Model prediction of ratio of scaled
deflection angles.
"""Model prediction of ratio of scaled deflection angles.

:param z_lens: lens redshift
:param z_source_1: source_1 redshift
Expand Down
3 changes: 1 addition & 2 deletions hierarc/Likelihood/cosmo_likelihood.py
Original file line number Diff line number Diff line change
Expand Up @@ -217,8 +217,7 @@ def cosmo_instance(self, kwargs_cosmo):
return cosmo

def info(self):
"""
prints information about the likelihood object
"""Prints information about the likelihood object.

:return: print statements
"""
Expand Down
3 changes: 1 addition & 2 deletions hierarc/Likelihood/hierarchy_likelihood.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,8 +169,7 @@ def __init__(
self._prior = PriorLikelihood(prior_list=prior_list)

def info(self):
"""
information about the lens
"""Information about the lens.

:return: print statement
"""
Expand Down
5 changes: 4 additions & 1 deletion hierarc/Likelihood/kin_scaling.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,10 @@ def __init__(self, param_grid_axes, j_kin_scaling_grid):

if self._dim_scaling == 1:
self._f_ani = interp1d(
param_grid_axes[0], j_kin_scaling_grid, kind="linear", fill_value="extrapolate"
param_grid_axes[0],
j_kin_scaling_grid,
kind="linear",
fill_value="extrapolate",
)
elif self._dim_scaling == 2:
self._f_ani = interp2d(
Expand Down
Loading