Skip to content

In-place naming convention #177

Open
@certik

Description

@certik

We need to figure out a consistent naming convention for routines that return the result in-place, as many routines will have two versions: in-place (e.g., eig_inplace) and out-of-place (e.g. eig). I think a good idea is to have the out-of-place version the default (eig), and have special naming convention for in-place (eig_inplace or some of the other option from the list below).

This was originally discussed at #10 (comment). List of options for syntax (#10 (comment)):

  • eig_inplace
  • eig_i or eig_I
  • eigI

I'll update this list if more candidates are proposed.

A lot of people like eig_inplace. It's long, but presumably it won't be used as often as eig, and it is clear what it does.

Other languages:

I couldn't find any naming convention how NumPy and Matlab does it. Looks like only Julia has a naming convention for in-place?

Julia

out-of-place: svd
in-place: svd!

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentationmetaRelated to this repository

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions