Skip to content

GH-46398: [GLib] Add GArrowFixedShapeTensorDataType#ndim #46399

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 2 commits into
base: main
Choose a base branch
from

Conversation

hiroyuki-sato
Copy link
Collaborator

@hiroyuki-sato hiroyuki-sato commented May 12, 2025

Rationale for this change

The C++ API implemented FixedShapeTensor::ndim() instance method. GLib was not yet supported.

What changes are included in this PR?

Add GArrowFixedShapeTensorDataType#ndim instance method.

Are these changes tested?

Yes.

Are there any user-facing changes?

Yes.

@hiroyuki-sato hiroyuki-sato requested a review from kou as a code owner May 12, 2025 00:46
Copy link

⚠️ GitHub issue #46398 has been automatically assigned in GitHub to PR creator.

@@ -2366,6 +2366,21 @@ garrow_fixed_shape_tensor_data_type_get_shape(GArrowFixedShapeTensorDataType *da
return arrow_shape.data();
}

/**
* garrow_fixed_shape_tensor_data_type_get_ndim:
Copy link
Member

Choose a reason for hiding this comment

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

Could you implement this as a property because this is not a complex type such as an array?

Could you use n_dims or n_dimensions instead of ndim?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

OK. Will try it.

@github-actions github-actions bot added awaiting changes Awaiting changes and removed awaiting review Awaiting review labels May 12, 2025
@hiroyuki-sato hiroyuki-sato marked this pull request as draft May 12, 2025 01:17
@hiroyuki-sato
Copy link
Collaborator Author

Requested change a little difficult for me. I will implement other methods (permutation, dim_names) at first.

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.

2 participants