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

Update partition.jl #157

Merged
merged 1 commit into from
Sep 10, 2019
Merged

Update partition.jl #157

merged 1 commit into from
Sep 10, 2019

Conversation

musm
Copy link
Contributor

@musm musm commented Sep 10, 2019

o = IndexedPartition(Float64, Hist(10))
fit!(o, randn(10^4, 2))

using Plots 
plot(o)

Is the histogram is taken over the second dimension (in this case only 2 points)? Kinda confused on how IndexedPartition works

@codecov
Copy link

codecov bot commented Sep 10, 2019

Codecov Report

Merging #157 into master will decrease coverage by 0.08%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #157      +/-   ##
==========================================
- Coverage   73.47%   73.39%   -0.09%     
==========================================
  Files          17       17              
  Lines        1233     1233              
==========================================
- Hits          906      905       -1     
- Misses        327      328       +1
Impacted Files Coverage Δ
src/viz/partition.jl 66.66% <ø> (ø) ⬆️
src/stats/histograms.jl 75.88% <0%> (-0.71%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 227ab21...6bcd0b2. Read the comment docs.

@joshday
Copy link
Owner

joshday commented Sep 10, 2019

Kinda. What you wrote shouldn't work, actually.

This would iterate over rows:

o = IndexedPartition(Float64, KHist(10))
fit!(o, eachrow(randn(10^4, 2)))

The first value is the x variable and second is the y variable.

@joshday joshday merged commit 328aa00 into joshday:master Sep 10, 2019
@musm
Copy link
Contributor Author

musm commented Sep 10, 2019

Oh ok. So what exactly does the example in the document do then?

@joshday
Copy link
Owner

joshday commented Sep 10, 2019

Ah...that example is broken (deprecated syntax. Now eachrow/eachcol or some other iterator is required). I fixed the gh-pages docs, but not the inline docs.

@joshday
Copy link
Owner

joshday commented Sep 10, 2019

(fixed on master)

@musm
Copy link
Contributor Author

musm commented Sep 10, 2019

I see so IndexedPartition takes partitions of size b over the iterator and performs the stat T.

It would be nice if there was T=Number default

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