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

[FIX] stats: Fix statistics for primitive variables #3722

Merged
merged 1 commit into from
Apr 5, 2019

Conversation

VesnaT
Copy link
Contributor

@VesnaT VesnaT commented Apr 4, 2019

Issue

Fixes #3671

Description of changes
Includes
  • Code changes
  • Tests
  • Documentation

@codecov
Copy link

codecov bot commented Apr 4, 2019

Codecov Report

Merging #3722 into master will decrease coverage by <.01%.
The diff coverage is 100%.

@@            Coverage Diff             @@
##           master    #3722      +/-   ##
==========================================
- Coverage   84.52%   84.52%   -0.01%     
==========================================
  Files         373      373              
  Lines       68459    68460       +1     
==========================================
  Hits        57868    57868              
- Misses      10591    10592       +1

@@ -361,7 +361,9 @@ def weighted_mean():
X.shape[0] - non_zero,
non_zero))
else:
nans = (~X.astype(bool)).sum(axis=0) if X.size else np.zeros(X.shape[1])
X_str = X.astype(str)
nans = ((X_str == "nan") | (X_str == "")).sum(axis=0) \
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have my doubts about a literal 'nan' being treated as missing.

@ajdapretnar
Copy link
Contributor

@janezd @lanzagar @markotoplak How do you feel about a literal 'nan' being treated as missing? 'nan' can have meaning in English other than missing values (e.g. grandmother, naan bread).

@ajdapretnar
Copy link
Contributor

Ok, we have decided to accept the current solution. We consider 'nan' to be a borderline case and if it ever arises, we will fix it then.

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.

2 participants