Skip to content
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

Define getproperty on AbstractZeroTangents #636

Merged
merged 3 commits into from
Oct 13, 2023
Merged

Define getproperty on AbstractZeroTangents #636

merged 3 commits into from
Oct 13, 2023

Conversation

oxinabox
Copy link
Member

This is for the same reason getindex is defined.
Often you want to be able to treat a ZeroTangent as though it were a structural tangent.
So you want it to have the same fields as the primal just with them all zero

@oxinabox oxinabox added the Structural Tangent Related to the `Tangent` type for structured (composite) values label Oct 13, 2023
@codecov
Copy link

codecov bot commented Oct 13, 2023

Codecov Report

All modified lines are covered by tests ✅

Comparison is base (ef8905b) 93.90% compared to head (5066406) 93.90%.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #636   +/-   ##
=======================================
  Coverage   93.90%   93.90%           
=======================================
  Files          14       14           
  Lines         902      903    +1     
=======================================
+ Hits          847      848    +1     
  Misses         55       55           
Files Coverage Δ
src/tangent_types/abstract_zero.jl 96.15% <100.00%> (+0.15%) ⬆️

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@willtebbutt willtebbutt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
@oxinabox oxinabox merged commit efc2f86 into main Oct 13, 2023
24 of 28 checks passed
@oxinabox oxinabox deleted the ox/zero_getprop branch October 13, 2023 09:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Structural Tangent Related to the `Tangent` type for structured (composite) values
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants