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

updates to align more with DM style guide #155

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Conversation

humnaawan
Copy link
Collaborator

No description provided.

Copy link
Member

@rhiannonlynne rhiannonlynne left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Problems with "is" vs. an element-wise comparison, but once those are fixed it looks like.

@@ -566,7 +566,7 @@ def _check_feasibility(self, conditions):
distances = _angular_separation(
self.ra, self.dec, self.ra[max_reward_indx], self.dec[max_reward_indx]
)
valid_pix = np.where((np.isnan(reward) == False) & (distances < self.max_radius_peak))[0]
valid_pix = np.where((np.isnan(reward) is False) & (distances < self.max_radius_peak))[0]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"is" can't be used in this comparison

@@ -213,7 +213,7 @@ def flush_script(self, conditions):
"""Remove things from the script that aren't needed anymore"""
if self.obs_wanted is not None:
still_relevant = np.where(
(self.obs_wanted["observed"] == False) & (self.obs_wanted["flush_by_mjd"] > conditions.mjd)
(self.obs_wanted["observed"] is False) & (self.obs_wanted["flush_by_mjd"] > conditions.mjd)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cannot use "is" here

@humnaawan
Copy link
Collaborator Author

@rhiannonlynne I replaced the two instances of the not-element-wise checks - please lmk what you think.

also, would you know how to fix the CI check with the docs?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants