Skip to content

Conversation

damskii9992
Copy link
Contributor

Small fixes:
Ensure that all value setters always take float of input to avoid Integer Scipp scalars.
Remove full_value setter of Parameter

@damskii9992 damskii9992 requested a review from andped10 August 26, 2024 11:27
@damskii9992 damskii9992 added the fix PR label label Aug 26, 2024
@damskii9992 damskii9992 requested a review from rozyczko August 26, 2024 12:00
Copy link
Member

@rozyczko rozyczko left a comment

Choose a reason for hiding this comment

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

makes sense to disallow the direct assignment.

self._scalar = scalar
if self._callback.fset is not None:
self._callback.fset(scalar)
raise AttributeError(f'Full_value is read-only. Change the value and variance seperately. or create a new {self.__class__.__name__}.') # noqa: E501
Copy link
Member

Choose a reason for hiding this comment

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

Capitalize or (also, in descriptor_number

@damskii9992 damskii9992 merged commit b177361 into master Aug 26, 2024
damskii9992 added a commit that referenced this pull request Aug 26, 2024
@damskii9992 damskii9992 deleted the 58-ensure-values-are-always-floats branch August 26, 2024 13:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

fix PR label

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants