Skip to content

Conversation

@DrPaulSharp
Copy link
Collaborator

No description provided.

Copy link
Contributor

@StephenNneji StephenNneji left a comment

Choose a reason for hiding this comment

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

Build failing

Copy link
Contributor

@StephenNneji StephenNneji 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.

Although it should be noted that (on line 882 and 883) the pyArrayToRatRowArray1d function outputs a coder::array<real_T, 1U> but the problem_struct.fitParams expects a coder::array<real_T, 2U> so an implicit type conversion is happening somewhere. Please double check that the data is not lost in the conversion. We should probably refactor that function to ensure we avoid implicit type conversion in the future

python-RAT/cpp/rat.cpp

Lines 882 to 883 in cca93e0

problem_struct.fitParams = customCaller("Problem.fitParams", pyArrayToRatRowArray1d, problem.fitParams);
problem_struct.otherParams = customCaller("Problem.otherParams", pyArrayToRatRowArray1d, problem.otherParams);

@DrPaulSharp
Copy link
Collaborator Author

The function pyArrayToRatRowArray1d is only used for fitParams and otherParams, so should we simply refactor it to expect and output coder::array<real_T, 2U>?

@DrPaulSharp DrPaulSharp merged commit 4af2abf into RascalSoftware:main Jan 7, 2025
7 checks passed
@DrPaulSharp DrPaulSharp deleted the bugfix branch January 7, 2025 11:21
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