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

Add asdict method that returns JSON-encodable object #84

Merged
merged 2 commits into from
Nov 15, 2016
Merged

Conversation

lopuhin
Copy link
Contributor

@lopuhin lopuhin commented Nov 15, 2016

Explanation object can still contain numpy objects (it may be faster and more convenient), transformation to plain python objects happens in numpy_to_python object.

Transformation in asdict loses information anyway (at least it loses types of objects), but here another loss of information occurs for FormattedFeatureName where we just take it's value and can not distinguish formatted and not formatted feature names. I think that this might be better to make feature name a wrapper object in any case (we also have unhashed features represented as lists) - but then it's better to do it separately.

@codecov-io
Copy link

codecov-io commented Nov 15, 2016

Current coverage is 96.43% (diff: 96.00%)

Merging #84 into master will decrease coverage by 0.01%

@@             master        #84   diff @@
==========================================
  Files            30         30          
  Lines          1407       1431    +24   
  Methods           0          0          
  Messages          0          0          
  Branches        258        268    +10   
==========================================
+ Hits           1357       1380    +23   
  Misses           27         27          
- Partials         23         24     +1   
Diff Coverage File Path
••••••••• 95% eli5/base_utils.py
•••••••••• 100% eli5/base.py

Powered by Codecov. Last update beb76a9...5db85a2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants