Skip to content

[FEATURE] From plural to singular form for function names #477

Description

@jeertmans

Terms

  • Checked the existing issues to see if my suggestion has not already been suggested;

Description

The function names in the library currently use plural forms to emphasize support for broadcasting arrays. However, this can sometimes conflict with some input arguments that are, by design, must be plural by default.

One good example is triangles_visible_from_vertices: the num_triangles axis is very important since it represent on "mesh", where triangles can shadow themselves. However, passing one or multiple vertices doesn't change the output, since it simply vectorizes the function for every vertex. Hence, the name could become triangles_visible_from_vertex.

Similarly, we could have:

  • rays_intersect_any_triangle become ray_intersect_any_triangle (here, any implies reduction on multiple triangles);
  • first_triangles_hit_by_rays become first_triangle_hit_by_ray;
  • refractive_indices become refractive_index;
  • etc.

Things to do:

  • Rename functions and update references to those functions;
  • Document breaking changes in CHANGELOG.md;
  • Update docstrings to use proper singular / plural form when relevant.

Screenshots

No response

Additional information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestneeds-triageThis issue has not been manually labelled yet

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions