-
Notifications
You must be signed in to change notification settings - Fork 80
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
Possible inconsistency of methods of class MinHash
#82
Comments
right - at the time I was conflicted between having __len__ return the
actual number of minhashes, OR the n size of the minhash collection.
with the added maturity of a few extra months of age, I agree that __len__
should be consistent with what is actually returned and we should have a
separate 'size' or 'max_size' property to set/get the minhash size.
if that seems appropriate, I am working in that area of code right now (see
#83) and could add something.
|
May be drop Note that PR #79 is fixing a bit of the C code to allow the use of getters/setters (which allow |
On Tue, Jan 03, 2017 at 07:26:54AM -0800, Laurent Gautier wrote:
May be drop `__len__` altogether then. `MinHash` does not seem to implement of Python's sequence protocol anyways.
well, that could be fixed...?
__len__ is used for true/false or empty/not-empty calculations too, which I
like. Seems pythonic to have it work :)
Note that PR #79 is fixing a bit of the C code to allow the use of getters/setters (which allow `size` or `max_size` to be properties).
+1
|
Then if An alternative to that would be to have an attribute |
yes, from my perspective:
new attribute It is important to have a |
What about the following as an alternative to
|
We would have to encode the logic in |
This is probably OK and not too confusing, but it seems like something that should be done in fast C land if we already have the code working. |
I am uncertain the loss in performance would matter much (but depends on use cases). If C at all costs one could have a specialized method Not a priority and this can be revisited later, if at all. |
The class defines a
__len__()
, but the length of what is returned byget_mins
is not necessarily consistent:The text was updated successfully, but these errors were encountered: