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

Preserve values with dtype for NumpyOps/CupyOps.asarray #897

Merged
merged 6 commits into from
Aug 11, 2023

Conversation

adrianeboyd
Copy link
Contributor

Description

Always specify dtype when creating new arrays so that large integer values are preserved and not at risk of going through an intermediate float64 conversion.

Types of change

Bug fix.

Checklist

  • I confirm that I have the right to submit this contribution under the project's MIT license.
  • I ran the tests, and all new and existing tests passed.
  • My changes don't require a change to the documentation, or if they do, I've added all required information.

Always specify `dtype` when creating new arrays so that large integer
values are preserved and not at risk of going through an intermediate
`float64` conversion.
@adrianeboyd adrianeboyd added bug Bugs and behaviour differing from documentation feat / ops Backends and maths labels Aug 10, 2023
@adrianeboyd adrianeboyd linked an issue Aug 10, 2023 that may be closed by this pull request
@adrianeboyd
Copy link
Contributor Author

@explosion-bot please test_gpu

@explosion-bot
Copy link
Collaborator

explosion-bot commented Aug 10, 2023

🪁 Successfully triggered build on Buildkite

URL: https://buildkite.com/explosion-ai/thinc-gpu-test-suite/builds/111

@adrianeboyd adrianeboyd merged commit 37419e5 into explosion:master Aug 11, 2023
danieldk added a commit to danieldk/thinc that referenced this pull request Jan 9, 2024
PR explosion#897 fixed the dtypes in strings2arrays, however also broke
strings2arrays for batches with sequences if inequal lengths.
danieldk added a commit to danieldk/thinc that referenced this pull request Jan 9, 2024
PR explosion#897 fixed the dtypes in strings2arrays, however also broke
strings2arrays for batches with sequences if inequal lengths.
@svlandeg svlandeg mentioned this pull request Jan 16, 2024
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Bugs and behaviour differing from documentation feat / ops Backends and maths
Projects
None yet
Development

Successfully merging this pull request may close these issues.

NumPy asarray op does not respect dtype for lists
3 participants