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

Removing Scalars from non-Scalar Calculations #9382

Merged
merged 4 commits into from
Jan 27, 2025

Conversation

derekagorhom
Copy link
Contributor

Fixes #9376
This PR should prevent the issue of the scalars function appearing when the user is not using the scalar option.
@rdstern , @N-thony can you review this code
Thanks

Copy link
Collaborator

@rdstern rdstern left a comment

Choose a reason for hiding this comment

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

@derekagorhom it is only partly working well.
Please can you get a scalar and the try to use it. I used the survey and saved mean(yield) into mean_yield as a scalar. Then tried a calculation of yield * mean_yield.
It says it doesn't recognise mean_yield. It used to do that fine.

@derekagorhom
Copy link
Contributor Author

@rdstern I have made the fix which prevented the check scalar options from producing results
Can you have a look at it again
Thanks

@rdstern
Copy link
Collaborator

rdstern commented Jan 24, 2025

@derekagorhom you have solved that problem, but seem to have created some more. You may need help, because it looks to be rather a mess now:
And I also wonder what testing you did, before my tests?

image

Here is what I did:
a) With the survey data I tried yield * 2 . That was to check there was no longer a use of the scalar lines in the output window, That seems fine.
b) Next I used, Clear, then the summary keyboard, got mean(yield) and saved it as a scalar called mean_yield. That seems almost fine, except I got a bonus of the result also in the output window. I am not sure whether that was happening before?
c) Then I used Clear, and got yield * mean_yield (pressed the scalar button for that), and saved it into a column, namely calc1. I worked but also gave the mess.
d) I now see it has also saved a copy of calc1 (a vector) as though it is another scalar. So now I have the columns I want, plus this bonus that I really, really don't want.

Copy link
Collaborator

@rdstern rdstern left a comment

Choose a reason for hiding this comment

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

@derekagorhom that's a relief. It now seems to be working. Many thanks.
@N-thony can you test as well as check the code. As a presumably separate issue I note that the number of significan figures does not apply to the scalars. They are displayed here with 13 decimals in the data frame metadata. Is this easy to change?

@N-thony N-thony merged commit 15a8c10 into IDEMSInternational:master Jan 27, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Check if we always need scalars in each calculation?
3 participants