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

Add support for NumPy arrays to the arrow serializer for string datatypes #7689

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

abey79
Copy link
Member

@abey79 abey79 commented Oct 11, 2024

What

This adds support for Numpy array for batches of Utf8 datatypes. For example, this facilitates logging a TextBatch when using Pandas dataframe:

rr.send_columns(
    "/entity/path",
    times=[rr.TimeSequenceColumn("frame_nr", df["frame_nr"])],
    components=[
        rr.components.TextBatch(np.where(df["mouth_open"], "OPEN", "CLOSE")),
    ],
)

Checklist

  • I have read and agree to Contributor Guide and the Code of Conduct
  • I've included a screenshot or gif (if applicable)
  • I have tested the web demo (if applicable):
  • The PR title and labels are set such as to maximize their usefulness for the next release's CHANGELOG
  • If applicable, add a new check to the release checklist!
  • If have noted any breaking changes to the log API in CHANGELOG.md and the migration guide

To run all checks from main, comment on the PR with @rerun-bot full-check.

@Wumpf Wumpf self-requested a review October 11, 2024 09:29
@abey79 abey79 marked this pull request as draft October 11, 2024 09:30
Copy link
Member

@Wumpf Wumpf left a comment

Choose a reason for hiding this comment

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

unit test plz!

also this could be fairly easy part of codegen? Something seems to be wrong with codegen here

@abey79 abey79 changed the title Add support for NumPy arrays to the Utf8 datatype arrow serializer Add support for NumPy arrays to the arrow serializer for string datatypes Oct 11, 2024
@abey79 abey79 marked this pull request as ready for review October 11, 2024 13:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants