Skip to content

Unitless dimvar should return as value-type #71

Description

@chaseInversion

When a DimVar method results in a new DimVar that is unitless, it currently outputs a DimVar with no units. Here is an example:

Python input

print(f" sin(a) = {a.sin()}") 
print(f" sin(a) units: {a.sin().base_units()}")

Output

sin(a) = 0.25881904510252074 (SI base units)
sin(a) units: (0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0)

Unless there is some added benefit, I would recommend those methods return the result as the value type. That would mean the value type can be operated on with it's native methods with an unnecessary "value()" call by the user.

Alternatively, adding all of the native methods of the value types would do the same thing.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

BugSomething isn't working

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions