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

Added DataSeries fillNilsWith method #103

Merged
merged 1 commit into from Jul 11, 2019

Conversation

@AtharvaKhare
Copy link
Contributor

commented Jun 19, 2019

TODO: Add methods for filling with Mean, Mode and Median. This is dependent upon the PR #102, since it will make the code shorter.

@AtharvaKhare AtharvaKhare referenced this pull request Jun 20, 2019
@olekscode

This comment has been minimized.

Copy link
Member

commented Jun 21, 2019

DataSeries >> fillNilsWith: anObject [
	"Fills nils inplace with anObject"

 	self withIndexDo: [ :ele :index |
		ele isNil
			ifTrue: [ self atIndex: index put: anObject ]
			ifFalse: [ self atIndex: index put: ele ] ]

ifFalse: part is not needed. But it takes time.
Remove it:

DataSeries >> fillNilsWith: anObject [
	"Fills nils inplace with anObject"

 	self withIndexDo: [ :ele :index |
		ele isNil
			ifTrue: [ self atIndex: index put: anObject ] ]
Added DataSeries fillNilsWith method
Also added relevant tests

@AtharvaKhare AtharvaKhare force-pushed the AtharvaKhare:fill_nils branch from b719852 to 2327c6d Jun 24, 2019

@olekscode olekscode merged commit ffbd70b into PolyMathOrg:master Jul 11, 2019

3 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
coverage/coveralls Coverage increased (+0.1%) to 90.887%
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.