Skip to content

355 convert long num arrays #358

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

Draft
wants to merge 14 commits into
base: dev
Choose a base branch
from
Draft

355 convert long num arrays #358

wants to merge 14 commits into from

Conversation

songmeo
Copy link
Contributor

@songmeo songmeo commented Jun 14, 2025

addresses #355

@coveralls
Copy link

coveralls commented Jun 14, 2025

Coverage Status

coverage: 94.241% (-0.09%) from 94.335%
when pulling 22a4dca on 355-convert-long-num-arrays
into c7b8223 on dev.

Copy link
Member

@pavel-kirienko pavel-kirienko left a comment

Choose a reason for hiding this comment

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

Remove changes from the other PR and add tests

elif len(s) <= 128:
return _strictify(Natural16(s)) if all(x >= 0 for x in s) else _strictify(Integer16(s))
elif len(s) <= 256:
return _strictify(Natural8(s)) if all(x >= 0 for x in s) else _strictify(Integer8(s))
if all(isinstance(x, (float, int, bool)) for x in s):
Copy link
Member

Choose a reason for hiding this comment

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

You need either this, or raise an exception in the previous if

Suggested change
if all(isinstance(x, (float, int, bool)) for x in s):
elif all(isinstance(x, (float, int, bool)) for x in s):

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