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

Make dim check in matrix space creation consistent #1729

Merged
merged 1 commit into from
Apr 25, 2024

Conversation

lgoettgens
Copy link
Collaborator

Alternative to and thus closes #1711.

All matrix space methods now check r and c in the constructor of the type.

Copy link

codecov bot commented Apr 24, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 84.93%. Comparing base (22e3908) to head (a837dca).

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1729      +/-   ##
==========================================
- Coverage   84.93%   84.93%   -0.01%     
==========================================
  Files          95       95              
  Lines       37235    37237       +2     
==========================================
- Hits        31627    31626       -1     
- Misses       5608     5611       +3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@thofma
Copy link
Member

thofma commented Apr 24, 2024

Hm, alternatively one could put them all into the user facing matrix_space functions, right?

@lgoettgens
Copy link
Collaborator Author

Hm, alternatively one could put them all into the user facing matrix_space functions, right?

Yes, it was basically a coin flip what I did

@thofma thofma mentioned this pull request Apr 25, 2024
@JohnAAbbott
Copy link
Contributor

Will this be merged soon? I have just ripped out my code (related to #1711), so that I could make PR #1732

@JohnAAbbott
Copy link
Contributor

Just not to lose this observation: it is strange that the ccalls to flint pass the numbers of rows/cols as Int rather than UInt. No doubt there is a reason for this...

@thofma
Copy link
Member

thofma commented Apr 25, 2024

Can you explain why you think this is strange?

@thofma thofma merged commit ccf389e into Nemocas:master Apr 25, 2024
25 of 26 checks passed
@JohnAAbbott
Copy link
Contributor

Since the numbers of rows/cols must be non-negative and there is a type for non-negative values, UInt, it seems strange to use a type Int which also allows negative values (which should only lead to errors). I have not looked at the Flint sources...

@thofma
Copy link
Member

thofma commented Apr 25, 2024

The ccall arguments must match the signature of the C function.

@JohnAAbbott
Copy link
Contributor

Ah, so my question was really about the flint UI; in C/C++ I understand one being wary of unsigned values.
Thanks for merging!

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.

3 participants