Skip to content

is_point too optimistic for (co)tangent bundles #911

Description

@SteffenPL

The following code surprised me

using Manifolds

M = Euclidean(2)
TM = TangentBundle(M)
coTM = CotangentBundle(M)

pt = [1.0,1]
nopt = [1.0, 1.0, 1.0]
v = [1.0,0.0]
nov = [1.0, 0.0, 0.0]

is_point(M, pt)           # true
is_point(M, nopt)         # false
# is_point(M, nothing)    # throws size error

is_point(TM, (pt, v))    # true   (correct)
is_point(TM, (nopt, v))  # true
is_point(TM, (pt, nov))  # true
is_point(TM, nothing)    # true

It seems that is_point isn't checking anything for (co)tangentbundles.

(I am traveling now, but happy to also draft a PR to get into manifolds; posted also here https://discourse.julialang.org/t/tangent-cotangent-bundles-in-manifolds-jl/137801/3)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions