-
Notifications
You must be signed in to change notification settings - Fork 54
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
Features/538 larray #680
Features/538 larray #680
Conversation
Codecov Report
@@ Coverage Diff @@
## master #680 +/- ##
=======================================
Coverage 97.47% 97.47%
=======================================
Files 87 87
Lines 17182 17231 +49
=======================================
+ Hits 16748 16796 +48
- Misses 434 435 +1
Continue to review full report at Codecov.
|
Outstanding job Lena. As far as I can see, our core is now issuing a lot of warning. As per issue that was asked for. However, I feel, that I should modify this as to: if the user is using the larray setter a warning should be issued, if the core is using larray, then warnings should be suppressed, as we are supposedly know what we are doing. Do you think you can change it to be that way? Or do you have differing thoughts? |
Thank you, Markus. Yes, I agree, this sounds reasonable to me. I'll try to change it to be that way. |
@lenablind can you handle the merge here? there is some minor conflicts with the |
@coquelin77 Yes for sure! Thank you for taking care of this and the previous PRs |
Description
Introduction of property
larray
, which allows access to the underlying local torch tensor (_DNDarray__array
/__array
attribute ofDNDarray
).For the setter, I included a warning as requested in the issue.
Consequently, I replaced all usages of
_DNDarray__array
within the project space withlarray
.As I specified torch.tensor as the only valid dtype for this attribute, I had to adapt function
average
in statistics, simply wrapping a float assignment into a tensor containing that specific float (just one line (328) modified).Issue/s resolved: #538
Changes proposed:
larray
in dndarray_DNDarray__array
withlarray
within the project spaceaverage
in statistics (line 328)Type of change
Due Diligence
Does this change modify the behaviour of other functions? If so, which?
no (, not after the presented modification of
average
in statistics. Without the wrapping, a TypeError is thrown as specified in the setter oflarray
, which expected a torch.tensor but got a float (in the corresponding tests) instead).