Skip to content

Add informative error when converting symbolic dimensions to Unitful #80

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

jkrumbiegel
Copy link
Contributor

Fixes #79

Copy link
Contributor

github-actions bot commented Nov 8, 2023

Benchmark Results

main bfd9d0e... t[main]/t[bfd9d0e...]
Quantity/creation/Quantity(x) 3.4 ± 0 ns 3.1 ± 0.1 ns 1.1
Quantity/creation/Quantity(x, length=y) 3.4 ± 0 ns 3.4 ± 0 ns 1
Quantity/with_numbers/*real 3 ± 0.1 ns 3.4 ± 0 ns 0.882
Quantity/with_numbers/^int 11.9 ± 4.1 ns 11.9 ± 3.9 ns 1
Quantity/with_numbers/^int * real 12.2 ± 4.7 ns 12.7 ± 4.4 ns 0.961
Quantity/with_quantity/+y 7.1 ± 0 ns 7.7 ± 0.1 ns 0.922
Quantity/with_quantity//y 3.7 ± 0 ns 3.4 ± 0 ns 1.09
Quantity/with_self/dimension 1.7 ± 0 ns 1.7 ± 0 ns 1
Quantity/with_self/inv 3.4 ± 0 ns 3.4 ± 0 ns 1
Quantity/with_self/ustrip 1.7 ± 0 ns 1.7 ± 0 ns 1
QuantityArray/broadcasting/multi_array_of_quantities 0.224 ± 0.17 ms 0.224 ± 0.17 ms 1
QuantityArray/broadcasting/multi_normal_array 0.076 ± 0.0023 ms 0.0788 ± 0.005 ms 0.964
QuantityArray/broadcasting/multi_quantity_array 0.254 ± 0.0012 ms 0.254 ± 0.0013 ms 1
QuantityArray/broadcasting/x^2_array_of_quantities 0.0432 ± 0.0054 ms 0.0436 ± 0.0054 ms 0.991
QuantityArray/broadcasting/x^2_normal_array 9 ± 1.7 μs 9 ± 1.6 μs 1
QuantityArray/broadcasting/x^2_quantity_array 10 ± 1.8 μs 9.6 ± 1.5 μs 1.04
QuantityArray/broadcasting/x^4_array_of_quantities 0.134 ± 0.0039 ms 0.137 ± 0.0063 ms 0.978
QuantityArray/broadcasting/x^4_normal_array 0.071 ± 0.003 ms 0.0687 ± 0.0007 ms 1.03
QuantityArray/broadcasting/x^4_quantity_array 0.107 ± 0.0015 ms 0.0916 ± 0.011 ms 1.16
time_to_load 0.206 ± 0.00076 s 0.206 ± 0.016 s 0.999

Benchmark Plots

A plot of the benchmark results have been uploaded as an artifact to the workflow run for this PR.
Go to "Actions"->"Benchmark a pull request"->[the most recent run]->"Artifacts" (at the bottom).

@MilesCranmer
Copy link
Member

Awesome. Thanks!

@MilesCranmer MilesCranmer merged commit a9a81e5 into SymbolicML:main Nov 8, 2023
@MilesCranmer
Copy link
Member

Do you need a release or on main for now until the next release is okay?

@jkrumbiegel
Copy link
Contributor Author

I don't need it, just thought it'd be nice to have for others

@MilesCranmer
Copy link
Member

Sounds good, ill do a release

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Unitful conversion fails for symbolic units
2 participants