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 example.py due to LTS update #40

Merged
merged 2 commits into from
Feb 23, 2023
Merged

Fix example.py due to LTS update #40

merged 2 commits into from
Feb 23, 2023

Conversation

jwbishop
Copy link
Contributor

@jwbishop jwbishop commented Jan 11, 2023

Updates example to address the update to the least trimmed squares processing code.

Fixes #39.

@jwbishop jwbishop requested review from davidfee5 and liamtoney and removed request for davidfee5 January 11, 2023 02:14
@liamtoney
Copy link
Member

I think the updates to example.py here are working, but when I run that script using this branch I get the following error:

ALPHA is 1.00. Performing an ordinary least squares fit, NOT least trimmed squares.
/Users/ldtoney/repos/lts_array/lts_array/classes/lts_classes.py:725: RuntimeWarning: invalid value encountered in sqrt
  sigma_tau[jj] = np.sqrt(tau[weights, jj, :].T @ residuals / (
/Users/ldtoney/repos/lts_array/lts_array/classes/lts_classes.py:507: RuntimeWarning: invalid value encountered in cdouble_scalars
  D = np.sqrt(foo + (a * b - 2 * c - a2 * a / 4) / R)
/Users/ldtoney/repos/lts_array/lts_array/classes/lts_classes.py:508: RuntimeWarning: invalid value encountered in cdouble_scalars
  E = np.sqrt(foo - (a * b - 2 * c - a2 * a / 4) / R)  # ...

Related to NaNs?

@liamtoney
Copy link
Member

error

Whoops. I meant "warning" here. Looks good!

@jwbishop
Copy link
Contributor Author

error

Whoops. I meant "warning" here. Looks good!

I made a note on the lts_array page about the RuntimeWarning for future reference.

@liamtoney
Copy link
Member

liamtoney commented Feb 17, 2023

Are we good to merge here? Currently if someone tries example.py in master they'll get an error — I think we should fix this soon.

Copy link
Member

@davidfee5 davidfee5 left a comment

Choose a reason for hiding this comment

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

Looks good to me! Sorry for the delay...it dropped off my radar.

@davidfee5
Copy link
Member

@jwbishop want to merge this into the main branch? or I can. thanks!

@jwbishop jwbishop merged commit b7b3f38 into master Feb 23, 2023
@liamtoney liamtoney deleted the update_example branch February 23, 2023 20:25
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.

example.py fails due to lts_array updates
3 participants