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

Fix syntax warnings #556

Open
wants to merge 1 commit 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
6 changes: 3 additions & 3 deletions madminer/fisherinformation/geometry.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ def _information_inv(self, theta):
return np.linalg.inv(self._information(theta))

def _information_derivative(self, theta):
"""
r"""
Low level function that calculates the derivative of Fisher Information
`\partial_k I_{ij}` at the theory parameter `theta`.

Expand All @@ -184,7 +184,7 @@ def _information_derivative(self, theta):
)

def _christoffel(self, theta):
"""
r"""
Low level function that calculates the Christoffel symbol (2nd kind) Gamma^i_jk at
the theory parameter `theta`. Here Gamma^i_jk=0.5*I^{im}(\partial_k I_{mj}
+ \partial_j I_{mk} - \partial_m I_{jk})
Expand Down Expand Up @@ -346,7 +346,7 @@ def distance_contours(
stepsize = min([(limit[1] - limit[0]) / 20.0 for limit in grid_ranges])
if ntrajectories is None:
ntrajectories = 20 * self.dimension
if self.dimension is not 2:
if self.dimension != 2:
continous_sampling = False

limits = (1.0 + 2.0 * stepsize) * np.array(grid_ranges)
Expand Down
2 changes: 1 addition & 1 deletion madminer/utils/interfaces/mg.py
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ def setup_mg_with_scripts(
)

# Replace environment variable in proc card
replacement_command = """sed -e 's@\$mgprocdir@'"$mgprocdir"'@' {}/{} > {}/{}""".format(
replacement_command = r"""sed -e 's@\$mgprocdir@'"$mgprocdir"'@' {}/{} > {}/{}""".format(
mg_process_directory_placeholder,
proc_card_filename_from_mgprocdir,
mg_process_directory_placeholder,
Expand Down