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

Remove lambda funcs #91

Merged
merged 12 commits into from
Mar 29, 2022
Merged

Remove lambda funcs #91

merged 12 commits into from
Mar 29, 2022

Conversation

jeremyneveu
Copy link
Collaborator

Remove lambda functions to make pickles with the outputs

.github/workflow/ci.yml Outdated Show resolved Hide resolved
Comment on lines +753 to +756
def N_func(x, y):
return a[0]
self.N_interp = N_func
self.N_fit = N_func
Copy link
Collaborator

Choose a reason for hiding this comment

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

A few things here:

  1. I don't know if this will pickle, but we'll find out. It's probably fine, I'm just not sure how different this actually will be to using a lambda.
  2. The function takes two parameters, ignores both of them, and just returns the first line of the file regardless? That seems odd.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

It is odd but the default is that it depends on two parameters. So to remain generic I define this dummy function with two parameters that always return the same value for N or theta

spectractor/extractor/dispersers.py Show resolved Hide resolved
@jeremyneveu jeremyneveu merged commit 4c7b4a0 into master Mar 29, 2022
@jeremyneveu jeremyneveu deleted the remove_lambda_funcs branch March 29, 2022 15:11
mfisherlevine added a commit to lsst/Spectractor that referenced this pull request Mar 29, 2022
DM-34226: Update Spectractor fork with PR LSSTDESC#91 from upstream
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