Skip to content

[Python] Add a FixedSizeTensorScalar class #37484

Description

@wjones127

Describe the enhancement requested

When you get a scalar off of a FixedSizeTensorArray, you get back a generic ExtensionTensor. There's not an easy way to get the tensor contained back as a numpy ndarray. It would be nice to have:

defFixedSizeTensorScalar(pa.ExtensionScalar):
defto_numpy_ndarray(): ...

Then one could do:

tensor_array[i].to_numpy_ndarray()

As a workaround, I currently do:

tensor_array.to_numpy_ndarray()[i]

Which isn't too bad.

Component(s)

Python

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions