Merged
Conversation
Signed-off-by: Henry Schreiner <henryfs@princeton.edu>
9f3b02d to
4dc8d93
Compare
Contributor
|
Hi @henryiii, I am definitely in favor of having the correct number of cells contained in the representation. I also noticed that right now it always says |
Member
|
Lgtm |
Signed-off-by: Henry Schreiner <henryfs@princeton.edu>
4dc8d93 to
2cf4174
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Followup to #1008. This fixes the repr for MultiCell, which currently always shows
0, since we can't get the actual instance, but just it's type (without the value of nelem).I've added a
h.get_storage()method which gets a storage object with the same parameters, an instance ofh.storage_type. It's natural for the repr, and allows users to query withh.get_storage().nelem. Thoughts, @HDembinski and @Superharz? I could make it a property instead, such ash.storage.nelem. The main issue is it is just thebh.storagecreation object, and doesn't actually give access to storage, so you can't do much withh.storage.Edit: I realized that making this a property actually works better for pattern matching, which expects properties to match constructor arguments, so I've used
h.storagenow.I thought about exposing
.nelemon the histogram, but I can't properly statically type it (mypy doesn't allow@propertyand@typing.overloadto be combined), and it's just None on most histograms.