-
Notifications
You must be signed in to change notification settings - Fork 1
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
Constructors #33
base: main
Are you sure you want to change the base?
Constructors #33
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #33 +/- ##
==========================================
- Coverage 75.05% 70.60% -4.46%
==========================================
Files 7 7
Lines 421 449 +28
==========================================
+ Hits 316 317 +1
- Misses 105 132 +27
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Seems reasonable, I was using constructors like |
A question I have about |
I added in Keep in mind that all of this is somewhat specific to non-stored entries being "zero", since otherwise these implementations become a bit ill-defined... |
I think I was using
Good point, we should start to keep track of which functions assume non-stored entries are zero and document that, and maybe check for it in functions that assume that. Maybe what we need is a trait function like |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we call this Registrator.yml
since that is what it is called in ITensorActions?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We definitely can, I have no strong opinions about this. (But let me know, because then we also have to update ITensorPkgSkeleton)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would prefer that, I think it would be simpler to have a convention that workflows are named after the shared ones in ITensorActions.
This PR changes some of the constructors of
SparseArrayDOK
to more closely resemble theirAbstractArray
counterparts, by explicitly requiringundef
.Additionally, once #32 are in place, this also ensures that inputs are checked such that unless you provide a fully-qualified type, we will check if all indices are within the correct bounds.
Also additionally, this now automatically works for any
AbstractDictionary
orAbstractDict
, with eitherCartesian
orInt
key types.Finally, for convenience I also added
sprand
andsprand!
(interface up for debate!) to facilitate easily creating random arrays for testing purposes.