Skip to content

Give Dimensions a type parameter. #14

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

oscardssmith
Copy link
Collaborator

No description provided.

@MilesCranmer
Copy link
Member

Okay I think I got it working. Could you add some unittests for custom Dimensions{R} types? Maybe the Int8/6 idea that you mentioned?

@MilesCranmer
Copy link
Member

Not sure why coveralls is failing but otherwise the tests are passing.

@MilesCranmer
Copy link
Member

Should probably test when and where type promotion happens, and if it gives expected behavior or not.

@MilesCranmer MilesCranmer changed the title Give Dimmensions a type parameter. Give Dimensions a type parameter. Jun 8, 2023
@github-actions
Copy link
Contributor

github-actions bot commented Jun 8, 2023

Benchmark Results

main 5d79a34... t[main]/t[5d79a34...]
creation/Quantity(x) 5.6 ± 0.5 ns 4.3 ± 0.2 ns 1.3
creation/Quantity(x, length=y) 5.1 ± 0.2 ns 4.6 ± 0.2 ns 1.11
time_to_load 0.176 ± 0.0069 s 0.0922 ± 0.01 s 1.91
with_numbers/*real 4.5 ± 0.3 ns 4.3 ± 0.1 ns 1.05
with_numbers/^int 0.0335 ± 0.0036 μs 0.247 ± 0.026 μs 0.135
with_numbers/^int * real 0.0344 ± 0.0039 μs 0.248 ± 0.024 μs 0.139
with_quantity/+y 22.7 ± 1.7 ns 0.333 ± 0.034 μs 0.0682
with_quantity//y 23 ± 1.7 ns 0.34 ± 0.039 μs 0.0677
with_self/dimension 1.8 ± 0.1 ns 2 ± 0.1 ns 0.9
with_self/inv 20.8 ± 1.6 ns 9.7 ± 0.3 ns 2.14
with_self/ustrip 1.9 ± 0.1 ns 2 ± 0.1 ns 0.95

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 MilesCranmer changed the base branch from main to cleaning-oscardssmith-patch-3 June 8, 2023 22:24
@MilesCranmer
Copy link
Member

Okay I think it's ready. Could you review my changes @oscardssmith ?

@oscardssmith
Copy link
Collaborator Author

LGTM

@MilesCranmer MilesCranmer merged commit fb19037 into SymbolicML:cleaning-oscardssmith-patch-3 Jun 9, 2023
@oscardssmith oscardssmith deleted the patch-3 branch June 9, 2023 14:02
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.

2 participants