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

Replace manifold.default_point_type by manifold.point_ndim #1700

Open
luisfpereira opened this issue Oct 20, 2022 · 3 comments
Open

Replace manifold.default_point_type by manifold.point_ndim #1700

luisfpereira opened this issue Oct 20, 2022 · 3 comments

Comments

@luisfpereira
Copy link
Collaborator

manifold.default_point_type is a property relying on manifold.shape. It is nice to still have a property with this information because it simplifies a bit the code in a lot of parts of the library.

Nevertheless, following @ninamiolane suggestion, manifold.point_ndim may be a better naming because we will have an integer instead of a string (easier to avoid types) and point shapes greater than 2 will be captured differently.

Are you aligned with this @ninamiolane?

@johnharveymath
Copy link
Collaborator

I would suggest that this particular variable name might cause confusion with manifold.dimension.

Perhaps manifold.point_repr_depth or manifold.point_coord_depth or manifold.point_array_depth or manifold.shape_depth? I think 'depth' is a good word for indicating how many dimensions an array has without using the word 'dimension'. Something that makes it clear that it is not a mathematical property of the manifold but a property of how we are representing or co-ordinatizing points of the manifold. manifold.shape_depth might be my favourite because it suggests, accurately, that the property is derived from manifold.shape.

@luisfpereira
Copy link
Collaborator Author

Thanks for the suggestion @johnharveymath.

I like the suffix ndim because it connects to the method we are interested in gs.array (gs.ndim). Would point_repr_ndim be more clear? I think depth does not ring a bell for people used to work with arrays.

We are also thinking about renaming manifold.shape to manifold.point_shape (or, following partially your suggestion manifold.point_repr_shape).

What do you think?

@johnharveymath
Copy link
Collaborator

That makes sense as a reason to use ndim. And yes, I'm not a fan of manifold.shape. When I saw it first I had no idea what it might be. The other possibilities are more informative.

My concern about something like point_repr_ndim is that if you gave me a 3x3 array and said it represented a point in SO(3), then asked me that I thought point_repr_ndim should be, my gut answer would be 9, not 2.

What about array_ndim and array_shape (or point_array_ndim and point_array_shape), making clear that it is the dimension and shape of the array that we are talking about?

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

No branches or pull requests

2 participants