Skip to content

catdomain and catcodomain are exported but undocumented #484

Description

@VinceNeede

catdomain and catcodomain are both exported from TensorKit, but ?catdomain / ?catcodomain return nothing — there's no docstring attached to either.

The explanation does exist, just not attached to the functions — it's prose on the linear algebra docs page:

If we have two TensorMap{T, S, N, 1} instances t1 and t2 with the same codomain, we can combine them in a way that is analogous to hcat, i.e. we stack them such that the new tensor catdomain(t1, t2) has also the same codomain, but has a domain which is domain(t1) ⊕ domain(t2). Similarly, if t1 and t2 are of type TensorMap{T, S, 1, N} and have the same domain, the operation catcodomain(t1, t2) results in a new tensor with the same domain and a codomain given by codomain(t1) ⊕ codomain(t2), which is the analogy of vcat. Note that the direct sum only makes sense between ElementarySpace objects, i.e. there is no way to give a tensor product meaning to a direct sum of tensor product spaces.

It might be nice to have this (or a shorter version of it) directly on the functions as a docstring, so ?catdomain works without needing to already know where to look for it.

Happy to open a PR adding docstrings based on the existing explanation above, if that's welcome.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions