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 warnings #3

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Python/rddensity/src/rddensity/rdbwdensity.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ def rdbwdensity(X, c=0, p=2,
# missing values
X = pd.DataFrame(X)
if X.isnull().values.any():
warnings.warn(X.isnull().sum() + 'missing observation(s) are ignored.\n')
warnings.warn(f'{X.isnull().sum()} missing observation(s) are ignored.\n')

X = X.dropna(axis=0)
# sample sizes
Expand Down
4 changes: 2 additions & 2 deletions Python/rddensity/src/rddensity/rddensity.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,10 +119,10 @@ def rddensity(X, c=0, p=2, q=0,
else:
raise Exception("No more than two bandwidths are accepted.")

#missing value handling
# missing value handling
X = pd.DataFrame(X)
if X.isnull().values.any():
warnings.warn(X.isnull().sum() + 'missing observation(s) are ignored.\n')
warnings.warn(f'{X.isnull().sum()} missing observation(s) are ignored.\n')

X = X.dropna(axis=0)

Expand Down
4 changes: 2 additions & 2 deletions Python/rddensity/src/rddensity/rdplotdensity.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,10 +90,10 @@ def rdplotdensity(rdd, X, plotRange=None, plotN=[10], plotGrid=['es', 'qs'],
nUniqueMin = rdd.nUniqueMin
massPoints = rdd.massPoints

#missing value handling
# missing value handling
X = pd.DataFrame(X)
if X.isnull().values.any():
warnings.warn(X.isnull().sum() + 'missing observation(s) are ignored.\n')
warnings.warn(f'{X.isnull().sum()} missing observation(s) are ignored.\n')

X = X.dropna(axis=0)

Expand Down