Skip to content

Vector operations with quantities #378

@adrn

Description

@adrn

I think we should add dispatches for some operators between vectors and quantities. For example:

vec = cx.CartesianPos3D.from_([1., 2., 3.], "kpc")
q = u.Quantity(1., "kpc")
vec / q  # CartesianPos3D with dimensionless unit 
vec * q  # CartesianPos3D with kpc**2 unit

Thoughts?

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